mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 06:05:53 +00:00
BUGFIX MSSQLDatabase::getIndexSqlDefinition() should check a primary key exists before trying to use an empty variable and causing dev/build failures
This commit is contained in:
parent
4b933d7e73
commit
c1ba0fafc9
@ -851,7 +851,9 @@ class MSSQLDatabase extends SS_Database {
|
||||
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;";
|
||||
if($primary_key) {
|
||||
$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