Browse Source

Update DB\Mysql

Visman 3 years ago
parent
commit
bb8ef348e7
1 changed files with 3 additions and 3 deletions
  1. 3 3
      app/Core/DB/Mysql.php

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

@@ -393,10 +393,10 @@ class Mysql
         $this->testStr($new);
 
         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;