Merge pull request #261 from armetiz/patch-7
Unique key name isn't correctly set - DDC-1603
This commit is contained in:
commit
2bb511584e
@ -223,13 +223,13 @@ class SchemaTool
|
||||
|
||||
if (isset($class->table['indexes'])) {
|
||||
foreach ($class->table['indexes'] AS $indexName => $indexData) {
|
||||
$table->addIndex($indexData['columns'], $indexName);
|
||||
$table->addIndex($indexData['columns'], is_numeric($indexName) ? null : $indexName);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($class->table['uniqueConstraints'])) {
|
||||
foreach ($class->table['uniqueConstraints'] AS $indexName => $indexData) {
|
||||
$table->addUniqueIndex($indexData['columns'], $indexName);
|
||||
$table->addUniqueIndex($indexData['columns'], is_numeric($indexName) ? null : $indexName);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user