mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/16741] Add support for dropping primary keys and removing constraints
PHPBB3-16741
This commit is contained in:
@@ -60,6 +60,16 @@ class sqlsrv_platform extends SQLServer2012Platform
|
||||
}
|
||||
}
|
||||
|
||||
// When dropping a primary key, the constraint needs to be dropped
|
||||
foreach ($diff->removedIndexes as $key => $index)
|
||||
{
|
||||
if ($index->isPrimary())
|
||||
{
|
||||
unset($diff->removedIndexes[$key]);
|
||||
$sql[] = $this->getDropConstraintSQL($index->getQuotedName($this), $diff->name);
|
||||
}
|
||||
}
|
||||
|
||||
$sql = array_merge($sql, parent::getAlterTableSQL($diff));
|
||||
|
||||
$doctrine_names = [];
|
||||
|
Reference in New Issue
Block a user