Skip to content
Browse files

Merge pull request #261 from armetiz/patch-7

Unique key name isn't correctly set - DDC-1603
  • Loading branch information...
2 parents 0f07044 + 21c9be7 commit 2bb511584e5d37ddad6c669a19d8e6b4a20f7b2b @guilhermeblanco guilhermeblanco committed Jan 16, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Doctrine/ORM/Tools/SchemaTool.php
View
4 lib/Doctrine/ORM/Tools/SchemaTool.php
@@ -223,13 +223,13 @@ public function getSchemaFromMetadata(array $classes)
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);
}
}

0 comments on commit 2bb5115

Please sign in to comment.
Something went wrong with that request. Please try again.