diff options
author | Brion Vibber <brion@pobox.com> | 2010-10-18 18:07:25 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-10-18 18:07:25 -0700 |
commit | ebe9972df6c0e20df9ff5d2a6439da1d16c28965 (patch) | |
tree | 43eea4dd3965537d3b51b19c687dd231b2ae4e2f /lib/schema.php | |
parent | a053871ddc6c2e9d395efa928d0546efffd52856 (diff) |
tweak unique constraint setup
Diffstat (limited to 'lib/schema.php')
-rw-r--r-- | lib/schema.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/schema.php b/lib/schema.php index 4feb11a87..391f0f1fd 100644 --- a/lib/schema.php +++ b/lib/schema.php @@ -234,7 +234,7 @@ class Schema */ function appendUniqueKeyDef(array &$sql, $name, array $def) { - $sql[] = "UNIQUE $name " . $this->buildIndexList($def); + $sql[] = "CONSTRAINT $name UNIQUE " . $this->buildIndexList($def); } /** @@ -618,7 +618,7 @@ class Schema $sql = array(); $sql[] = 'ADD'; $this->appendUniqueKeyDef($sql, $keyName, $def); - $phrase[] = implode(' ', $sql);'ADD CONSTRAINT ' . $keyName; + $phrase[] = implode(' ', $sql); } function appendAlterDropUnique(array &$phrase, $keyName) |