From ebe9972df6c0e20df9ff5d2a6439da1d16c28965 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 18 Oct 2010 18:07:25 -0700 Subject: [PATCH] tweak unique constraint setup --- lib/schema.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/schema.php b/lib/schema.php index 4feb11a879..391f0f1fdf 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) -- 2.39.5