Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Guilherme Blanco authored January 16, 2012

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  lib/Doctrine/ORM/Tools/SchemaTool.php
4  lib/Doctrine/ORM/Tools/SchemaTool.php
@@ -223,13 +223,13 @@ public function getSchemaFromMetadata(array $classes)
223 223
 
224 224
             if (isset($class->table['indexes'])) {
225 225
                 foreach ($class->table['indexes'] AS $indexName => $indexData) {
226  
-                    $table->addIndex($indexData['columns'], $indexName);
  226
+                    $table->addIndex($indexData['columns'], is_numeric($indexName) ? null : $indexName);
227 227
                 }
228 228
             }
229 229
 
230 230
             if (isset($class->table['uniqueConstraints'])) {
231 231
                 foreach ($class->table['uniqueConstraints'] AS $indexName => $indexData) {
232  
-                    $table->addUniqueIndex($indexData['columns'], $indexName);
  232
+                    $table->addUniqueIndex($indexData['columns'], is_numeric($indexName) ? null : $indexName);
233 233
                 }
234 234
             }
235 235
 

0 notes on commit 2bb5115

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