Commit 5b390c7b authored by Craig Mason's avatar Craig Mason Committed by Benjamin Eberlei

Fix SQLServerPlatform adds unique constraint to ADD PRIMARY KEY statement

This will only happen when adding primary keys via ALTER TABLE
parent 97801a74
......@@ -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