Commit 60252189 authored by Craig Mason's avatar Craig Mason

Fix SQLServerPlatform adds unique constraint to ADD PRIMARY KEY statement

This will only happen when adding primary keys via ALTER TABLE
parent b3e0e6d6
......@@ -256,7 +256,7 @@ class SQLServerPlatform extends AbstractPlatform
{
$constraint = parent::getCreateIndexSQL($index, $table);
if ($index->isUnique()) {
if ($index->isUnique() && $index->isPrimary() === false) {
$constraint = $this->_appendUniqueConstraintDefinition($constraint, $index);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment