diff options
Diffstat (limited to 'database/updates.inc')
-rw-r--r-- | database/updates.inc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/database/updates.inc b/database/updates.inc index a854e97ce..e6c1874aa 100644 --- a/database/updates.inc +++ b/database/updates.inc @@ -1218,7 +1218,7 @@ function system_update_159() { case 'mysql': $ret[] = update_sql("UPDATE {sequences} SET id = $vid WHERE name = '{node_revisions}_vid'"); break; - + case 'pgsql': $ret[] = update_sql("SELECT setval('{node_revisions}_vid_seq', $vid)"); break; @@ -1993,3 +1993,17 @@ function system_update_181() { } return $ret; } + +/** + * The lid field in pgSQL should not be UNIQUE, but an INDEX. + */ +function system_update_182() { + $ret = array(); + + if ($GLOBALS['db_type'] == 'pgsql') { + $ret[] = update_sql('ALTER TABLE {locales_target} DROP CONSTRAINT {locales_target}_lid_idx'); + $ret[] = update_sql('CREATE INDEX {locales_target}_lid_idx ON {locales_target} (lid)'); + } + + return $ret; +} |