mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-02 14:18:20 +02:00
BUGFIX Fixed fulltext not being dropped before re-adding it in MSSQLDatabase::getIndexSqlDefinition()
This commit is contained in:
parent
c44f5ca9ed
commit
27c3997061
@ -736,10 +736,14 @@ class MSSQLDatabase extends SS_Database {
|
|||||||
if($this->fullTextEnabled()) {
|
if($this->fullTextEnabled()) {
|
||||||
//Enable full text search.
|
//Enable full text search.
|
||||||
$this->createFullTextCatalog();
|
$this->createFullTextCatalog();
|
||||||
|
|
||||||
$primary_key = $this->getPrimaryKey($tableName);
|
$primary_key = $this->getPrimaryKey($tableName);
|
||||||
|
|
||||||
return "CREATE FULLTEXT INDEX ON \"$tableName\" ({$indexSpec['value']}) KEY INDEX $primary_key WITH CHANGE_TRACKING AUTO;";
|
$query = '';
|
||||||
|
if($this->fullTextIndexExists($tableName)) {
|
||||||
|
$query .= "\nDROP FULLTEXT INDEX ON \"$tableName\";";
|
||||||
|
}
|
||||||
|
$query .= "CREATE FULLTEXT INDEX ON \"$tableName\" ({$indexSpec['value']}) KEY INDEX $primary_key WITH CHANGE_TRACKING AUTO;";
|
||||||
|
return $query;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user