This is an old revision of the document!
The page contains the details about the changes that were made to old components during the development of v3.3.0 (unreleased) compared with what existed in v3.2.x. It does not include the brand new modules, focusing on how to upgrade database and configuration file from v3.2.x to run with Kamailio v3.3.0.
These sections presents notes, listed by modules, about the structure of database tables that existed in v3.2.x and changed during development of v3.3.0.
NOT NULL
* instance VARCHAR(255) DEFAULT NULL
* table location
* table version is 5
* new columns:
* ruid VARCHAR(64) DEFAULT
NOT NULLYou can use next SQL commands (made for MySQL) to update the structure of existing tables in v3.2.x for v3.3.0:
-- DIALOG ALTER TABLE dialog ADD iflags INT(10) UNSIGNED DEFAULT 0 NOT NULL; ALTER TABLE dialog ADD xdata VARCHAR(512); ALTER TABLE dialog MODIFY caller_cseq VARCHAR(20) NOT NULL; ALTER TABLE dialog MODIFY callee_cseq VARCHAR(20) NOT NULL; UPDATE version SET table_version=7 WHERE TABLE_NAME='dialog'; -- DOMAIN ALTER TABLE DOMAIN ADD did VARCHAR(64) DEFAULT NULL; UPDATE version SET table_version=2 WHERE TABLE_NAME='domain'; CREATE TABLE domain_attrs ( id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, did VARCHAR(64) NOT NULL, name VARCHAR(32) NOT NULL, TYPE INT UNSIGNED NOT NULL, VALUE VARCHAR(255) NOT NULL, last_modified DATETIME DEFAULT '1900-01-01 00:00:01' NOT NULL, CONSTRAINT domain_attrs_idx UNIQUE (did, name, VALUE) ) ENGINE=MyISAM; INSERT INTO version (TABLE_NAME, table_version) VALUES ('domain_attrs','1'); -- LCR ALTER TABLE lcr_gw MODIFY ip_addr VARCHAR(47) NOT NULL; -- MSILO ALTER TABLE silo ADD extra_hdrs TEXT DEFAULT '' NOT NULL; UPDATE version SET table_version=6 WHERE TABLE_NAME='silo'; -- MTREE ALTER TABLE mtrees ADD CONSTRAINT tname_tprefix_idx UNIQUE (tname, tprefix); ALTER TABLE mtrees DROP CONSTRAINT tname_tprefix_tvalue_idx UNIQUE (tname, tprefix, tvalue); UPDATE version SET table_version=2 WHERE TABLE_NAME='mtrees'; -- PERMISSIONS ALTER TABLE address MODIFY grp INT(11) UNSIGNED DEFAULT 1 NOT NULL ALTER TABLE address MODIFY ip_addr VARCHAR(48) NOT NULL ALTER TABLE address MODIFY mask INT DEFAULT 32 NOT NULL UPDATE version SET table_version=5 WHERE TABLE_NAME='address'; -- USRLOC ALTER TABLE aliases ADD ruid VARCHAR(64) DEFAULT '' NOT NULL; ALTER TABLE aliases ADD instance VARCHAR(255) DEFAULT NULL; UPDATE version SET table_version=2 WHERE TABLE_NAME='aliases'; ALTER TABLE location ADD ruid VARCHAR(64) DEFAULT '' NOT NULL; ALTER TABLE location ADD instance VARCHAR(255) DEFAULT NULL; UPDATE version SET table_version=2 WHERE TABLE_NAME='location';
This is the translation of the above script for PostgreSQL (should work with 9.1.1, but is untested!)
ALTER TABLE lcr_gw ALTER COLUMN ip_addr TYPE VARCHAR(47);