Module: sip-router Branch: 3.1 Commit: 6239efef5fe047248843da847d1cc458a44bd658 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6239efef...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Wed Aug 3 18:03:05 2011 +0200
kamctl: added missing db tables creation scripts
- pipelimit was not generated after cherry-picking the xml schema definition, reported by Hala Alramli - other tables were ignored due to match of 'kamailio' token in path due to gitignore rules
---
utils/kamctl/db_berkeley/kamailio/mtree | 12 ++++++++++++ utils/kamctl/db_berkeley/kamailio/pl_pipes | 12 ++++++++++++ utils/kamctl/db_berkeley/kamailio/uacreg | 12 ++++++++++++ utils/kamctl/dbtext/kamailio/mtree | 2 ++ utils/kamctl/dbtext/kamailio/pl_pipes | 2 ++ utils/kamctl/dbtext/kamailio/uacreg | 2 ++ utils/kamctl/mysql/pipelimit-create.sql | 8 ++++++++ utils/kamctl/oracle/pipelimit-create.sql | 16 ++++++++++++++++ utils/kamctl/postgres/pipelimit-create.sql | 8 ++++++++ 9 files changed, 74 insertions(+), 0 deletions(-)
diff --git a/utils/kamctl/db_berkeley/kamailio/mtree b/utils/kamctl/db_berkeley/kamailio/mtree new file mode 100644 index 0000000..ec9b169 --- /dev/null +++ b/utils/kamctl/db_berkeley/kamailio/mtree @@ -0,0 +1,12 @@ +METADATA_COLUMNS +id(int) tprefix(str) tvalue(str) +METADATA_KEY + +METADATA_READONLY +0 +METADATA_LOGFLAGS +0 +METADATA_DEFAULTS +NIL|''|'' +mtree| +mtree|1 diff --git a/utils/kamctl/db_berkeley/kamailio/pl_pipes b/utils/kamctl/db_berkeley/kamailio/pl_pipes new file mode 100644 index 0000000..01a105e --- /dev/null +++ b/utils/kamctl/db_berkeley/kamailio/pl_pipes @@ -0,0 +1,12 @@ +METADATA_COLUMNS +id(int) pipeid(str) algorithm(str) plimit(int) +METADATA_KEY + +METADATA_READONLY +0 +METADATA_LOGFLAGS +0 +METADATA_DEFAULTS +NIL|''|''|0 +pl_pipes| +pl_pipes|1 diff --git a/utils/kamctl/db_berkeley/kamailio/uacreg b/utils/kamctl/db_berkeley/kamailio/uacreg new file mode 100644 index 0000000..2ebc01c --- /dev/null +++ b/utils/kamctl/db_berkeley/kamailio/uacreg @@ -0,0 +1,12 @@ +METADATA_COLUMNS +id(int) l_uuid(str) l_username(str) l_domain(str) r_username(str) r_domain(str) realm(str) auth_username(str) auth_password(str) auth_proxy(str) expires(int) +METADATA_KEY + +METADATA_READONLY +0 +METADATA_LOGFLAGS +0 +METADATA_DEFAULTS +NIL|''|''|''|''|''|''|''|''|''|0 +uacreg| +uacreg|1 diff --git a/utils/kamctl/dbtext/kamailio/mtree b/utils/kamctl/dbtext/kamailio/mtree new file mode 100644 index 0000000..2b6dcb6 --- /dev/null +++ b/utils/kamctl/dbtext/kamailio/mtree @@ -0,0 +1,2 @@ +id(int,auto) tprefix(string) tvalue(string) +mtree:1 diff --git a/utils/kamctl/dbtext/kamailio/pl_pipes b/utils/kamctl/dbtext/kamailio/pl_pipes new file mode 100644 index 0000000..bc51e86 --- /dev/null +++ b/utils/kamctl/dbtext/kamailio/pl_pipes @@ -0,0 +1,2 @@ +id(int,auto) pipeid(string) algorithm(string) plimit(int) +pl_pipes:1 diff --git a/utils/kamctl/dbtext/kamailio/uacreg b/utils/kamctl/dbtext/kamailio/uacreg new file mode 100644 index 0000000..cbb82bb --- /dev/null +++ b/utils/kamctl/dbtext/kamailio/uacreg @@ -0,0 +1,2 @@ +id(int,auto) l_uuid(string) l_username(string) l_domain(string) r_username(string) r_domain(string) realm(string) auth_username(string) auth_password(string) auth_proxy(string) expires(int) +uacreg:1 diff --git a/utils/kamctl/mysql/pipelimit-create.sql b/utils/kamctl/mysql/pipelimit-create.sql new file mode 100644 index 0000000..86fd350 --- /dev/null +++ b/utils/kamctl/mysql/pipelimit-create.sql @@ -0,0 +1,8 @@ +INSERT INTO version (table_name, table_version) values ('pl_pipes','1'); +CREATE TABLE pl_pipes ( + id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, + pipeid VARCHAR(64) DEFAULT '' NOT NULL, + algorithm VARCHAR(32) DEFAULT '' NOT NULL, + plimit INT DEFAULT 0 NOT NULL +) ENGINE=MyISAM; + diff --git a/utils/kamctl/oracle/pipelimit-create.sql b/utils/kamctl/oracle/pipelimit-create.sql new file mode 100644 index 0000000..09439a4 --- /dev/null +++ b/utils/kamctl/oracle/pipelimit-create.sql @@ -0,0 +1,16 @@ +INSERT INTO version (table_name, table_version) values ('pl_pipes','1'); +CREATE TABLE pl_pipes ( + id NUMBER(10) PRIMARY KEY, + pipeid VARCHAR2(64) DEFAULT '', + algorithm VARCHAR2(32) DEFAULT '', + plimit NUMBER(10) DEFAULT 0 NOT NULL +); + +CREATE OR REPLACE TRIGGER pl_pipes_tr +before insert on pl_pipes FOR EACH ROW +BEGIN + auto_id(:NEW.id); +END pl_pipes_tr; +/ +BEGIN map2users('pl_pipes'); END; +/ diff --git a/utils/kamctl/postgres/pipelimit-create.sql b/utils/kamctl/postgres/pipelimit-create.sql new file mode 100644 index 0000000..6c4917b --- /dev/null +++ b/utils/kamctl/postgres/pipelimit-create.sql @@ -0,0 +1,8 @@ +INSERT INTO version (table_name, table_version) values ('pl_pipes','1'); +CREATE TABLE pl_pipes ( + id SERIAL PRIMARY KEY NOT NULL, + pipeid VARCHAR(64) DEFAULT '' NOT NULL, + algorithm VARCHAR(32) DEFAULT '' NOT NULL, + plimit INTEGER DEFAULT 0 NOT NULL +); +