From a8e3940619c9afa9d82df72770513d17925b1302 Mon Sep 17 00:00:00 2001 From: romanb Date: Sat, 5 Sep 2009 19:44:26 +0000 Subject: [PATCH] [2.0] Fixed single-column unique constraint support in SchemaTool --- lib/Doctrine/ORM/Tools/SchemaTool.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Tools/SchemaTool.php b/lib/Doctrine/ORM/Tools/SchemaTool.php index 10c5e62af..f7582b850 100644 --- a/lib/Doctrine/ORM/Tools/SchemaTool.php +++ b/lib/Doctrine/ORM/Tools/SchemaTool.php @@ -245,7 +245,8 @@ class SchemaTool $column['type'] = Type::getType($mapping['type']); $column['length'] = isset($mapping['length']) ? $mapping['length'] : null; $column['notnull'] = isset($mapping['nullable']) ? ! $mapping['nullable'] : false; - + $column['unique'] = isset($mapping['unique']) ? ! $mapping['unique'] : false; + if (isset($mapping['precision'])) { $column['precision'] = $mapping['precision']; }