diff --git a/lib/Doctrine/ORM/Tools/SchemaTool.php b/lib/Doctrine/ORM/Tools/SchemaTool.php index 60760e66c..b0d14eb26 100644 --- a/lib/Doctrine/ORM/Tools/SchemaTool.php +++ b/lib/Doctrine/ORM/Tools/SchemaTool.php @@ -229,7 +229,7 @@ class SchemaTool 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); } }