From: Brion Vibber Date: Tue, 19 Oct 2010 01:07:25 +0000 (-0700) Subject: tweak unique constraint setup X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ebe9972df6c0e20df9ff5d2a6439da1d16c28965;p=quix0rs-gnu-social.git tweak unique constraint setup --- 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)