From: Brenda Wallace Date: Sat, 15 May 2010 03:14:11 +0000 (+1200) Subject: indexes now working in postgres schemas X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=191752138a26087648dc665595fb9ca566306637;p=quix0rs-gnu-social.git indexes now working in postgres schemas --- diff --git a/lib/pgsqlschema.php b/lib/pgsqlschema.php index 12f24cfbe1..24b847a986 100644 --- a/lib/pgsqlschema.php +++ b/lib/pgsqlschema.php @@ -172,18 +172,16 @@ class PgsqlSchema extends Schema $sql .= ",\n primary key (" . implode(',', $primary) . ")"; } - - - foreach ($indices as $i) { - $sql .= ",\nindex {$name}_{$i}_idx ($i)"; - } - $sql .= "); "; foreach ($uniques as $u) { $sql .= "\n CREATE index {$name}_{$u}_idx ON {$name} ($u); "; } + + foreach ($indices as $i) { + $sql .= "CREATE index {$name}_{$i}_idx on {$name} ($i)"; + } $res = $this->conn->query($sql); if (PEAR::isError($res)) {