mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
BUG: Fixed index generation to meet new SS3 expectations.
In SS3, the column lists passed through for index specifications are now quoted. The database adaptor needed to be updated to meet this change.
This commit is contained in:
parent
0465f1b1a2
commit
22d53b036b
@ -835,10 +835,7 @@ class MSSQLDatabase extends SS_Database {
|
||||
|
||||
if(!is_array($indexSpec)) {
|
||||
$indexSpec=trim($indexSpec, '()');
|
||||
$bits=explode(',', $indexSpec);
|
||||
$indexes="\"" . implode("\",\"", $bits) . "\"";
|
||||
|
||||
return "$drop CREATE INDEX $index ON \"" . $tableName . "\" (" . $indexes . ");";
|
||||
return "$drop CREATE INDEX $index ON \"" . $tableName . "\" (" . $indexSpec . ");";
|
||||
} else {
|
||||
// create a type-specific index
|
||||
if($indexSpec['type'] == 'fulltext') {
|
||||
|
Loading…
Reference in New Issue
Block a user