From: Evan Prodromou Date: Sun, 18 Sep 2011 21:54:48 +0000 (-0400) Subject: Drop fulltext indexes that aren't used in new def X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3eaa3234f9bd7f6e2361b32c1dd481023398850e;p=quix0rs-gnu-social.git Drop fulltext indexes that aren't used in new def --- diff --git a/lib/schema.php b/lib/schema.php index 0ac2255f16..e188037e68 100644 --- a/lib/schema.php +++ b/lib/schema.php @@ -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.