Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #261 from armetiz/patch-7
Unique key name isn't correctly set - DDC-1603
  • Loading branch information
guilhermeblanco committed Jan 17, 2012
2 parents 0f07044 + 21c9be7 commit 2bb5115
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Doctrine/ORM/Tools/SchemaTool.php
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 2bb5115

Please sign in to comment.