mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 06:05:53 +00:00
BUG: open ticket 7813 fixing dobule quoting issue in getIndexSqlDefinition
This commit is contained in:
parent
530c97f671
commit
357482d6c9
@ -860,7 +860,7 @@ class MSSQLDatabase extends SS_Database {
|
|||||||
if($indexSpec['type'] == 'unique') {
|
if($indexSpec['type'] == 'unique') {
|
||||||
if(!is_array($indexSpec['value'])) $columns = preg_split('/ *, */', trim($indexSpec['value']));
|
if(!is_array($indexSpec['value'])) $columns = preg_split('/ *, */', trim($indexSpec['value']));
|
||||||
else $columns = $indexSpec['value'];
|
else $columns = $indexSpec['value'];
|
||||||
$SQL_columnList = '"' . implode('", "', $columns) . '"';
|
$SQL_columnList = implode(', ', $columns);
|
||||||
|
|
||||||
return "$drop CREATE UNIQUE INDEX $index ON \"" . $tableName . "\" ($SQL_columnList);";
|
return "$drop CREATE UNIQUE INDEX $index ON \"" . $tableName . "\" ($SQL_columnList);";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user