This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
install:upgrade:3.1.x-to-3.2.0 [2011/12/09 15:06] 190.111.205.115 PostgreSQL script |
install:upgrade:3.1.x-to-3.2.0 [2014/02/26 15:43] miconda [modules_k/acc] |
||
---|---|---|---|
Line 14: | Line 14: | ||
* callid column in has now the size varchar(255) | * callid column in has now the size varchar(255) | ||
- | ==== modules_k/acc ==== | + | ==== modules_k/htable |
* table **htable** | * table **htable** | ||
Line 119: | Line 119: | ||
</ | </ | ||
- | This is the translation of the above script for PostgreSQL (tested with 9.1.1) | + | This is the translation of the above script for PostgreSQL (tested with 9.1.1). |
+ | |||
+ | Difference: Instead of adding prefix column, the script renames tag to prefix, and then, creates the new tag column. So that, you don't have to migrate all the values from tag to prefix column. | ||
<code sql> | <code sql> | ||
Line 151: | Line 153: | ||
UPDATE version SET table_version=2 WHERE table_name=' | UPDATE version SET table_version=2 WHERE table_name=' | ||
ALTER TABLE lcr_gw DROP CONSTRAINT lcr_gw_lcr_id_ip_addr_port_hostname_idx; | ALTER TABLE lcr_gw DROP CONSTRAINT lcr_gw_lcr_id_ip_addr_port_hostname_idx; | ||
- | ALTER TABLE lcr_gw | + | ALTER TABLE lcr_gw |
- | ALTER TABLE lcr_gw | + | ALTER TABLE lcr_gw |
- | ALTER TABLE lcr_gw ALTER COLUMN | + | |
ALTER TABLE lcr_gw ALTER COLUMN tag SET DEFAULT NULL; | ALTER TABLE lcr_gw ALTER COLUMN tag SET DEFAULT NULL; | ||
CREATE INDEX lcr_id_idx ON lcr_gw (lcr_id); | CREATE INDEX lcr_id_idx ON lcr_gw (lcr_id); |