Module: sip-router
Branch: master
Commit: 0036521d5ad043ba5f6c07463a67b61ae76720b0
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0036521…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Dec 22 14:00:52 2011 +0100
kamctl: update db table definitions after change to mtrees key
- reported by Andreas Granig
---
utils/kamctl/db_berkeley/kamailio/version | 2 +-
utils/kamctl/db_sqlite/mtree-create.sql | 4 ++--
utils/kamctl/dbtext/kamailio/version | 2 +-
utils/kamctl/mysql/mtree-create.sql | 4 ++--
utils/kamctl/oracle/mtree-create.sql | 4 ++--
utils/kamctl/postgres/mtree-create.sql | 4 ++--
6 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/utils/kamctl/db_berkeley/kamailio/version
b/utils/kamctl/db_berkeley/kamailio/version
index 57b6f8f..98b5f87 100644
--- a/utils/kamctl/db_berkeley/kamailio/version
+++ b/utils/kamctl/db_berkeley/kamailio/version
@@ -73,7 +73,7 @@ missed_calls|3
mtree|
mtree|1
mtrees|
-mtrees|1
+mtrees|2
pdt|
pdt|1
pl_pipes|
diff --git a/utils/kamctl/db_sqlite/mtree-create.sql
b/utils/kamctl/db_sqlite/mtree-create.sql
index 77c0e38..7e25f04 100644
--- a/utils/kamctl/db_sqlite/mtree-create.sql
+++ b/utils/kamctl/db_sqlite/mtree-create.sql
@@ -6,12 +6,12 @@ CREATE TABLE mtree (
CONSTRAINT mtree_tprefix_idx UNIQUE (tprefix)
);
-INSERT INTO version (table_name, table_version) values ('mtrees','1');
+INSERT INTO version (table_name, table_version) values ('mtrees','2');
CREATE TABLE mtrees (
id INTEGER PRIMARY KEY NOT NULL,
tname VARCHAR(128) DEFAULT '' NOT NULL,
tprefix VARCHAR(32) DEFAULT '' NOT NULL,
tvalue VARCHAR(128) DEFAULT '' NOT NULL,
- CONSTRAINT mtrees_tname_tprefix_idx UNIQUE (tname, tprefix)
+ CONSTRAINT mtrees_tname_tprefix_tvalue_idx UNIQUE (tname, tprefix, tvalue)
);
diff --git a/utils/kamctl/dbtext/kamailio/version b/utils/kamctl/dbtext/kamailio/version
index 50adbcf..a41262e 100644
--- a/utils/kamctl/dbtext/kamailio/version
+++ b/utils/kamctl/dbtext/kamailio/version
@@ -31,7 +31,7 @@ location:1004
matrix:1
missed_calls:3
mtree:1
-mtrees:1
+mtrees:2
pdt:1
pl_pipes:1
presentity:3
diff --git a/utils/kamctl/mysql/mtree-create.sql b/utils/kamctl/mysql/mtree-create.sql
index 8834163..251ddea 100644
--- a/utils/kamctl/mysql/mtree-create.sql
+++ b/utils/kamctl/mysql/mtree-create.sql
@@ -6,12 +6,12 @@ CREATE TABLE mtree (
CONSTRAINT tprefix_idx UNIQUE (tprefix)
) ENGINE=MyISAM;
-INSERT INTO version (table_name, table_version) values ('mtrees','1');
+INSERT INTO version (table_name, table_version) values ('mtrees','2');
CREATE TABLE mtrees (
id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
tname VARCHAR(128) DEFAULT '' NOT NULL,
tprefix VARCHAR(32) DEFAULT '' NOT NULL,
tvalue VARCHAR(128) DEFAULT '' NOT NULL,
- CONSTRAINT tname_tprefix_idx UNIQUE (tname, tprefix)
+ CONSTRAINT tname_tprefix_tvalue_idx UNIQUE (tname, tprefix, tvalue)
) ENGINE=MyISAM;
diff --git a/utils/kamctl/oracle/mtree-create.sql b/utils/kamctl/oracle/mtree-create.sql
index f791897..115392b 100644
--- a/utils/kamctl/oracle/mtree-create.sql
+++ b/utils/kamctl/oracle/mtree-create.sql
@@ -14,13 +14,13 @@ END mtree_tr;
/
BEGIN map2users('mtree'); END;
/
-INSERT INTO version (table_name, table_version) values ('mtrees','1');
+INSERT INTO version (table_name, table_version) values ('mtrees','2');
CREATE TABLE mtrees (
id NUMBER(10) PRIMARY KEY,
tname VARCHAR2(128) DEFAULT '',
tprefix VARCHAR2(32) DEFAULT '',
tvalue VARCHAR2(128) DEFAULT '',
- CONSTRAINT mtrees_tname_tprefix_idx UNIQUE (tname, tprefix)
+ CONSTRAINT ORA_tname_tprefix_tvalue_idx UNIQUE (tname, tprefix, tvalue)
);
CREATE OR REPLACE TRIGGER mtrees_tr
diff --git a/utils/kamctl/postgres/mtree-create.sql
b/utils/kamctl/postgres/mtree-create.sql
index a7d0164..810aaae 100644
--- a/utils/kamctl/postgres/mtree-create.sql
+++ b/utils/kamctl/postgres/mtree-create.sql
@@ -6,12 +6,12 @@ CREATE TABLE mtree (
CONSTRAINT mtree_tprefix_idx UNIQUE (tprefix)
);
-INSERT INTO version (table_name, table_version) values ('mtrees','1');
+INSERT INTO version (table_name, table_version) values ('mtrees','2');
CREATE TABLE mtrees (
id SERIAL PRIMARY KEY NOT NULL,
tname VARCHAR(128) DEFAULT '' NOT NULL,
tprefix VARCHAR(32) DEFAULT '' NOT NULL,
tvalue VARCHAR(128) DEFAULT '' NOT NULL,
- CONSTRAINT mtrees_tname_tprefix_idx UNIQUE (tname, tprefix)
+ CONSTRAINT mtrees_tname_tprefix_tvalue_idx UNIQUE (tname, tprefix, tvalue)
);