mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 06:05:53 +00: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()) {
|
||||
//Enable full text search.
|
||||
$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…
x
Reference in New Issue
Block a user