User Tools

Site Tools


install:upgrade:3.1.x-to-3.2.0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous 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 [2018/06/01 14:06] (current)
k.vrban_gmail.com Discussed at: https://lists.kamailio.org/pipermail/sr-users/2018-May/101716.html
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 106: Line 106:
 UPDATE version SET table_version=1 WHERE table_name="rls_presentity"; UPDATE version SET table_version=1 WHERE table_name="rls_presentity";
 ALTER TABLE rls_presentity MODIFY content_type VARCHAR(255) NOT NULL; ALTER TABLE rls_presentity MODIFY content_type VARCHAR(255) NOT NULL;
-ALTER TABLE rls_presentity MODIFY callid VARCHAR(255) NOT NULL; +ALTER TABLE rls_watchers MODIFY callid VARCHAR(255) NOT NULL; 
-ALTER TABLE rls_presentity MODIFY contact VARCHAR(128) NOT NULL;+ALTER TABLE rls_watchers MODIFY contact VARCHAR(128) NOT NULL;
  
 UPDATE version SET table_version=3 WHERE table_name="sip_trace"; UPDATE version SET table_version=3 WHERE table_name="sip_trace";
Line 119: Line 119:
 </code> </code>
  
-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='lcr_gw'; UPDATE version SET table_version=2 WHERE table_name='lcr_gw';
 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 ADD prefix VARCHAR(16)+ALTER TABLE lcr_gw RENAME tag TO prefix; 
-ALTER TABLE lcr_gw ALTER COLUMN prefix SET DEFAULT NULL; +ALTER TABLE lcr_gw ADD tag VARCHAR(64);
-ALTER TABLE lcr_gw ALTER COLUMN tag TYPE VARCHAR(64);+
 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);
install/upgrade/3.1.x-to-3.2.0.1323439560.txt.gz · Last modified: 2011/12/09 15:06 by 190.111.205.115