]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Drop fulltext indexes that aren't used in new def
authorEvan Prodromou <evan@status.net>
Sun, 18 Sep 2011 21:54:48 +0000 (17:54 -0400)
committerEvan Prodromou <evan@status.net>
Sun, 18 Sep 2011 21:54:48 +0000 (17:54 -0400)
lib/schema.php

index 0ac2255f16a09bb1806111e06659b1b35fd75448..e188037e6837a1507ab8c0ac545e8f2a72eab9ae 100644 (file)
@@ -562,12 +562,18 @@ class Schema
         $uniques = $this->diffArrays($old, $def, 'unique keys');
         $indexes = $this->diffArrays($old, $def, 'indexes');
         $foreign = $this->diffArrays($old, $def, 'foreign keys');
+        $fulltext = $this->diffArrays($old, $def, 'fulltext indexes');
 
         // Drop any obsolete or modified indexes ahead...
         foreach ($indexes['del'] + $indexes['mod'] as $indexName) {
             $this->appendDropIndex($statements, $tableName, $indexName);
         }
 
+        // Drop any obsolete or modified fulltext indexes ahead...
+        foreach ($fulltext['del'] + $fulltext['mod'] as $indexName) {
+            $this->appendDropIndex($statements, $tableName, $indexName);
+        }
+
         // For efficiency, we want this all in one
         // query, instead of using our methods.