Drop fulltext indexes that aren't used in new def

This commit is contained in:
Evan Prodromou 2011-09-18 17:54:48 -04:00
parent e2914189f3
commit 3eaa3234f9

View 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.