Merge pull request #3 from silverstripe-rebelalliance/7813

BUG: open ticket 7813 fixing dobule quoting issue in getIndexSqlDefiniti...
This commit is contained in:
Sean Harvey 2012-08-28 16:28:20 -07:00
commit a74470ff52

View File

@ -860,7 +860,7 @@ class MSSQLDatabase extends SS_Database {
if($indexSpec['type'] == 'unique') {
if(!is_array($indexSpec['value'])) $columns = preg_split('/ *, */', trim($indexSpec['value']));
else $columns = $indexSpec['value'];
$SQL_columnList = '"' . implode('", "', $columns) . '"';
$SQL_columnList = implode(', ', $columns);
return "$drop CREATE UNIQUE INDEX $index ON \"" . $tableName . "\" ($SQL_columnList);";
}