diff options
author | Brenda Wallace <shiny@cpan.org> | 2010-05-15 15:14:11 +1200 |
---|---|---|
committer | Brenda Wallace <shiny@cpan.org> | 2010-05-15 15:14:11 +1200 |
commit | 191752138a26087648dc665595fb9ca566306637 (patch) | |
tree | 389345548c8ba2c20d880a67ddf2b33433b88244 /lib/pgsqlschema.php | |
parent | 7cf250ff188bac16400b688dd309d189ef99fde8 (diff) |
indexes now working in postgres schemas
Diffstat (limited to 'lib/pgsqlschema.php')
-rw-r--r-- | lib/pgsqlschema.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/pgsqlschema.php b/lib/pgsqlschema.php index 12f24cfbe..24b847a98 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)) { |