浏览代码

Update DB\Mysql

Visman 3 年之前
父节点
当前提交
bb8ef348e7
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      app/Core/DB/Mysql.php

+ 3 - 3
app/Core/DB/Mysql.php

@@ -393,10 +393,10 @@ class Mysql
         $this->testStr($new);
         $this->testStr($new);
 
 
         if (
         if (
-            ! $this->fieldExists($table, $old, $noPrefix)
-            || $this->fieldExists($table, $new, $noPrefix)
+            $this->fieldExists($table, $new, $noPrefix)
+            && ! $this->fieldExists($table, $old, $noPrefix)
         ) {
         ) {
-            return false;
+            return true;
         }
         }
 
 
         $table = ($noPrefix ? '' : $this->dbPrefix) . $table;
         $table = ($noPrefix ? '' : $this->dbPrefix) . $table;