Module: kamailio
Branch: master
Commit: e5067d45614abbc89710493f7f0916aa4f33432a
URL:
https://github.com/kamailio/kamailio/commit/e5067d45614abbc89710493f7f0916a…
Author: Jose Luis Verdeguer <pepeluxx(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-12-18T10:23:10+01:00
kamctl: generated sql creation scripts for secfilter module
---
Added: utils/kamctl/db_sqlite/secfilter-create.sql
Added: utils/kamctl/mysql/secfilter-create.sql
Added: utils/kamctl/oracle/secfilter-create.sql
Added: utils/kamctl/postgres/secfilter-create.sql
---
Diff:
https://github.com/kamailio/kamailio/commit/e5067d45614abbc89710493f7f0916a…
Patch:
https://github.com/kamailio/kamailio/commit/e5067d45614abbc89710493f7f0916a…
---
diff --git a/utils/kamctl/db_sqlite/secfilter-create.sql
b/utils/kamctl/db_sqlite/secfilter-create.sql
new file mode 100644
index 0000000000..6f8af6d5a9
--- /dev/null
+++ b/utils/kamctl/db_sqlite/secfilter-create.sql
@@ -0,0 +1,11 @@
+CREATE TABLE secfilter (
+ id INTEGER PRIMARY KEY NOT NULL,
+ action SMALLINT DEFAULT 0 NOT NULL,
+ type SMALLINT DEFAULT 0 NOT NULL,
+ data VARCHAR(64) DEFAULT '' NOT NULL
+);
+
+CREATE INDEX secfilter_idx ON secfilter (action, type, data);
+
+INSERT INTO version (table_name, table_version) values ('secfilter',
'1');
+
diff --git a/utils/kamctl/mysql/secfilter-create.sql
b/utils/kamctl/mysql/secfilter-create.sql
new file mode 100644
index 0000000000..9e6eab745f
--- /dev/null
+++ b/utils/kamctl/mysql/secfilter-create.sql
@@ -0,0 +1,11 @@
+CREATE TABLE `secfilter` (
+ `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ `action` TINYINT(1) DEFAULT 0 NOT NULL,
+ `type` TINYINT(1) DEFAULT 0 NOT NULL,
+ `data` VARCHAR(64) DEFAULT '' NOT NULL
+);
+
+CREATE INDEX secfilter_idx ON secfilter (`action`, `type`, `data`);
+
+INSERT INTO version (`table_name`, `table_version`) values ('secfilter',
'1');
+
diff --git a/utils/kamctl/oracle/secfilter-create.sql
b/utils/kamctl/oracle/secfilter-create.sql
new file mode 100644
index 0000000000..539be00a5d
--- /dev/null
+++ b/utils/kamctl/oracle/secfilter-create.sql
@@ -0,0 +1,19 @@
+CREATE TABLE secfilter (
+ id NUMBER(10) PRIMARY KEY,
+ action NUMBER(1) DEFAULT 0 NOT NULL,
+ type NUMBER(1) DEFAULT 0 NOT NULL,
+ data VARCHAR2(64) DEFAULT '' NOT NULL
+);
+
+CREATE OR REPLACE TRIGGER secfilter_tr
+before insert on secfilter FOR EACH ROW
+BEGIN
+ auto_id(:NEW.id);
+END secfilter_tr;
+/
+BEGIN map2users('secfilter'); END;
+/
+CREATE INDEX ORA_secfilter_idx ON secfilter (action, type, data);
+
+INSERT INTO version (table_name, table_version) values ('secfilter',
'1');
+
diff --git a/utils/kamctl/postgres/secfilter-create.sql
b/utils/kamctl/postgres/secfilter-create.sql
new file mode 100644
index 0000000000..fc44a806a9
--- /dev/null
+++ b/utils/kamctl/postgres/secfilter-create.sql
@@ -0,0 +1,11 @@
+CREATE TABLE secfilter (
+ id SERIAL PRIMARY KEY NOT NULL,
+ action SMALLINT DEFAULT 0 NOT NULL,
+ type SMALLINT DEFAULT 0 NOT NULL,
+ data VARCHAR(64) DEFAULT '' NOT NULL
+);
+
+CREATE INDEX secfilter_idx ON secfilter (action, type, data);
+
+INSERT INTO version (table_name, table_version) values ('secfilter',
'1');
+