silverstripe/silverstripe-mssql — pull request #1 by tractorcow (2012-08-24 00:32:05+00:00)
Title: FIXED: Critical error during index construction

Indexes specified on dataobjects with quotes would crash the database during dev build. MS Sql database assumed that columns were unquoted, and subsequently quotes them during index creation.

In fact, any already quoted index spec would end up double quoted. See below for an example.

In Versioned.php

```PHP
$versionIndexes = array_merge(
array(
'RecordID_Version' => array('type' => 'unique', 'value' => '"RecordID","Version"'),
'RecordID' => true,
'Version' => true,
),
(array)$indexes
);
```

Which MS SQL Server module would turn into

```SQL

CREATE UNIQUE INDEX ix_Page_versions_RecordID_Version ON "Page_versions" (""RecordID"", ""Version"");
```