Drop fulltext indexes that aren't used in new def
This commit is contained in:
parent
e2914189f3
commit
3eaa3234f9
@ -562,12 +562,18 @@ class Schema
|
|||||||
$uniques = $this->diffArrays($old, $def, 'unique keys');
|
$uniques = $this->diffArrays($old, $def, 'unique keys');
|
||||||
$indexes = $this->diffArrays($old, $def, 'indexes');
|
$indexes = $this->diffArrays($old, $def, 'indexes');
|
||||||
$foreign = $this->diffArrays($old, $def, 'foreign keys');
|
$foreign = $this->diffArrays($old, $def, 'foreign keys');
|
||||||
|
$fulltext = $this->diffArrays($old, $def, 'fulltext indexes');
|
||||||
|
|
||||||
// Drop any obsolete or modified indexes ahead...
|
// Drop any obsolete or modified indexes ahead...
|
||||||
foreach ($indexes['del'] + $indexes['mod'] as $indexName) {
|
foreach ($indexes['del'] + $indexes['mod'] as $indexName) {
|
||||||
$this->appendDropIndex($statements, $tableName, $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
|
// For efficiency, we want this all in one
|
||||||
// query, instead of using our methods.
|
// query, instead of using our methods.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user