mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-01 05:39:27 +02:00
MINOR Removed query to enable fulltext each time MSSQLDatabase::createFullTextCatalog() was called - it's already enabled on databases where fulltext is supported
This commit is contained in:
parent
9bbe3603ee
commit
ab1b49fdf0
@ -138,14 +138,12 @@ class MSSQLDatabase extends SS_Database {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This will set up the full text search capabilities.
|
* This will set up the full text search capabilities.
|
||||||
* Theoretically, you don't need to 'enable' it every time...
|
|
||||||
*
|
*
|
||||||
* TODO: make this a _config.php setting
|
* TODO: make this a _config.php setting
|
||||||
* TODO: VERY IMPORTANT: move this so it only gets called upon a dev/build action
|
* TODO: VERY IMPORTANT: move this so it only gets called upon a dev/build action
|
||||||
*/
|
*/
|
||||||
function createFullTextCatalog() {
|
function createFullTextCatalog() {
|
||||||
if($this->fullTextEnabled()) {
|
if($this->fullTextEnabled()) {
|
||||||
$this->query("exec sp_fulltext_database 'enable';");
|
|
||||||
$result = $this->query("SELECT name FROM sys.fulltext_catalogs WHERE name = 'ftCatalog';")->value();
|
$result = $this->query("SELECT name FROM sys.fulltext_catalogs WHERE name = 'ftCatalog';")->value();
|
||||||
if(!$result) $this->query("CREATE FULLTEXT CATALOG ftCatalog AS DEFAULT;");
|
if(!$result) $this->query("CREATE FULLTEXT CATALOG ftCatalog AS DEFAULT;");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user