mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
Merge pull request #41 from ajoneil/0.10
Fix errors when fulltext search is disabled.
This commit is contained in:
commit
ce4ce0dfae
@ -943,7 +943,11 @@ class MSSQLDatabase extends SS_Database {
|
|||||||
$drop = "IF EXISTS (SELECT name FROM sys.indexes WHERE name = '$index') DROP INDEX $index ON \"" . $tableName . "\";";
|
$drop = "IF EXISTS (SELECT name FROM sys.indexes WHERE name = '$index') DROP INDEX $index ON \"" . $tableName . "\";";
|
||||||
|
|
||||||
// create a type-specific index
|
// create a type-specific index
|
||||||
if($indexSpec['type'] == 'fulltext' && $this->fullTextEnabled()) {
|
if($indexSpec['type'] == 'fulltext') {
|
||||||
|
if(!$this->fullTextEnabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// enable fulltext on this table
|
// enable fulltext on this table
|
||||||
$this->createFullTextCatalog();
|
$this->createFullTextCatalog();
|
||||||
$primary_key = $this->getPrimaryKey($tableName);
|
$primary_key = $this->getPrimaryKey($tableName);
|
||||||
|
Loading…
Reference in New Issue
Block a user