Module: sip-router Branch: master Commit: 81248685cd11289daeb08fa24a7eb564dbf0b81e URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=81248685...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Wed Jul 20 23:38:51 2011 +0200
kamctl: added scripts to create pl_pipes table
---
utils/kamctl/db_berkeley/kamailio/pl_pipes | 12 ++++++++++++ utils/kamctl/db_sqlite/pipelimit-create.sql | 9 +++++++++ utils/kamctl/dbtext/kamailio/pl_pipes | 2 ++ utils/kamctl/mysql/pipelimit-create.sql | 9 +++++++++ utils/kamctl/oracle/pipelimit-create.sql | 17 +++++++++++++++++ utils/kamctl/postgres/pipelimit-create.sql | 9 +++++++++ 6 files changed, 58 insertions(+), 0 deletions(-)
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_sqlite/pipelimit-create.sql b/utils/kamctl/db_sqlite/pipelimit-create.sql new file mode 100644 index 0000000..6532298 --- /dev/null +++ b/utils/kamctl/db_sqlite/pipelimit-create.sql @@ -0,0 +1,9 @@ +INSERT INTO version (table_name, table_version) values ('pl_pipes','1'); +CREATE TABLE pl_pipes ( + id INTEGER PRIMARY KEY NOT NULL, + pipeid VARCHAR(64) DEFAULT '' NOT NULL, + algorithm VARCHAR(32) DEFAULT '' NOT NULL, + plimit INTEGER DEFAULT 0 NOT NULL +); + +CREATE INDEX pl_pipes_account_idx ON pl_pipes ( \ No newline at end of file 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/mysql/pipelimit-create.sql b/utils/kamctl/mysql/pipelimit-create.sql new file mode 100644 index 0000000..70feda8 --- /dev/null +++ b/utils/kamctl/mysql/pipelimit-create.sql @@ -0,0 +1,9 @@ +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; + +CREATE INDEX account_idx ON pl_pipes ( \ No newline at end of file diff --git a/utils/kamctl/oracle/pipelimit-create.sql b/utils/kamctl/oracle/pipelimit-create.sql new file mode 100644 index 0000000..5ba6534 --- /dev/null +++ b/utils/kamctl/oracle/pipelimit-create.sql @@ -0,0 +1,17 @@ +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; +/ +CREATE INDEX pl_pipes_account_idx ON pl_pipes ( \ No newline at end of file diff --git a/utils/kamctl/postgres/pipelimit-create.sql b/utils/kamctl/postgres/pipelimit-create.sql new file mode 100644 index 0000000..424d796 --- /dev/null +++ b/utils/kamctl/postgres/pipelimit-create.sql @@ -0,0 +1,9 @@ +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 +); + +CREATE INDEX pl_pipes_account_idx ON pl_pipes ( \ No newline at end of file