Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #261 from armetiz/patch-7

Unique key name isn't correctly set - DDC-1603
  • Loading branch information...
commit 2bb511584e5d37ddad6c669a19d8e6b4a20f7b2b 2 parents 0f07044 + 21c9be7
@guilhermeblanco guilhermeblanco authored
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);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.