Module: sip-router
Branch: master
Commit: c4a4b4f599ba428330899e804877e85d3fdcc3a4
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c4a4b4f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Oct 29 11:08:49 2013 +0100
kamctl: updated db creation scripts
---
utils/kamctl/db_berkeley/kamailio/mohqcalls | 2 --
utils/kamctl/db_berkeley/kamailio/mohqueues | 2 --
utils/kamctl/db_berkeley/kamailio/version | 4 ++++
utils/kamctl/db_sqlite/alias_db-create.sql | 5 +++--
utils/kamctl/dbtext/kamailio/mohqcalls | 1 -
utils/kamctl/dbtext/kamailio/mohqueues | 1 -
utils/kamctl/dbtext/kamailio/version | 2 ++
utils/kamctl/mysql/alias_db-create.sql | 5 +++--
utils/kamctl/oracle/alias_db-create.sql | 5 +++--
utils/kamctl/postgres/alias_db-create.sql | 5 +++--
10 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/utils/kamctl/db_berkeley/kamailio/mohqcalls
b/utils/kamctl/db_berkeley/kamailio/mohqcalls
index b80902e..0ecaef4 100644
--- a/utils/kamctl/db_berkeley/kamailio/mohqcalls
+++ b/utils/kamctl/db_berkeley/kamailio/mohqcalls
@@ -8,5 +8,3 @@ METADATA_LOGFLAGS
0
METADATA_DEFAULTS
NIL|NIL|NIL|NIL|NIL|NIL|'to_date('','yyyy-mm-dd hh24:mi:ss')'
-mohqcalls|
-mohqcalls|1
diff --git a/utils/kamctl/db_berkeley/kamailio/mohqueues
b/utils/kamctl/db_berkeley/kamailio/mohqueues
index f5eeb2c..eafd9ce 100644
--- a/utils/kamctl/db_berkeley/kamailio/mohqueues
+++ b/utils/kamctl/db_berkeley/kamailio/mohqueues
@@ -8,5 +8,3 @@ METADATA_LOGFLAGS
0
METADATA_DEFAULTS
NIL|NIL|NIL|NIL|NIL|NIL
-mohqueues|
-mohqueues|1
diff --git a/utils/kamctl/db_berkeley/kamailio/version
b/utils/kamctl/db_berkeley/kamailio/version
index c981eaa..e9e350b 100644
--- a/utils/kamctl/db_berkeley/kamailio/version
+++ b/utils/kamctl/db_berkeley/kamailio/version
@@ -76,6 +76,10 @@ matrix|
matrix|1
missed_calls|
missed_calls|3
+mohqcalls|
+mohqcalls|1
+mohqueues|
+mohqueues|1
mtree|
mtree|1
mtrees|
diff --git a/utils/kamctl/db_sqlite/alias_db-create.sql
b/utils/kamctl/db_sqlite/alias_db-create.sql
index 90656e9..f9975de 100644
--- a/utils/kamctl/db_sqlite/alias_db-create.sql
+++ b/utils/kamctl/db_sqlite/alias_db-create.sql
@@ -4,9 +4,10 @@ CREATE TABLE dbaliases (
alias_username VARCHAR(64) DEFAULT '' NOT NULL,
alias_domain VARCHAR(64) DEFAULT '' NOT NULL,
username VARCHAR(64) DEFAULT '' NOT NULL,
- domain VARCHAR(64) DEFAULT '' NOT NULL,
- CONSTRAINT dbaliases_alias_idx UNIQUE (alias_username, alias_domain)
+ domain VARCHAR(64) DEFAULT '' NOT NULL
);
+CREATE INDEX dbaliases_alias_user_idx ON dbaliases (alias_username);
+CREATE INDEX dbaliases_alias_idx ON dbaliases (alias_username, alias_domain);
CREATE INDEX dbaliases_target_idx ON dbaliases (username, domain);
diff --git a/utils/kamctl/dbtext/kamailio/mohqcalls
b/utils/kamctl/dbtext/kamailio/mohqcalls
index feacec1..c5454dc 100644
--- a/utils/kamctl/dbtext/kamailio/mohqcalls
+++ b/utils/kamctl/dbtext/kamailio/mohqcalls
@@ -1,2 +1 @@
id(int,auto) mohq_id(int) call_id(string) call_status(int) call_from(string)
call_contact(string,null) call_time(int)
-mohqcalls:1
diff --git a/utils/kamctl/dbtext/kamailio/mohqueues
b/utils/kamctl/dbtext/kamailio/mohqueues
index 687cb17..a44840b 100644
--- a/utils/kamctl/dbtext/kamailio/mohqueues
+++ b/utils/kamctl/dbtext/kamailio/mohqueues
@@ -1,2 +1 @@
id(int,auto) name(string) uri(string) mohdir(string,null) mohfile(string) debug(int)
-mohqueues:1
diff --git a/utils/kamctl/dbtext/kamailio/version b/utils/kamctl/dbtext/kamailio/version
index be869b3..c3ca5ad 100644
--- a/utils/kamctl/dbtext/kamailio/version
+++ b/utils/kamctl/dbtext/kamailio/version
@@ -33,6 +33,8 @@ location:6
location_attrs:1
matrix:1
missed_calls:3
+mohqcalls:1
+mohqueues:1
mtree:1
mtrees:2
pdt:1
diff --git a/utils/kamctl/mysql/alias_db-create.sql
b/utils/kamctl/mysql/alias_db-create.sql
index cfb73b9..86fe793 100644
--- a/utils/kamctl/mysql/alias_db-create.sql
+++ b/utils/kamctl/mysql/alias_db-create.sql
@@ -4,9 +4,10 @@ CREATE TABLE dbaliases (
alias_username VARCHAR(64) DEFAULT '' NOT NULL,
alias_domain VARCHAR(64) DEFAULT '' NOT NULL,
username VARCHAR(64) DEFAULT '' NOT NULL,
- domain VARCHAR(64) DEFAULT '' NOT NULL,
- CONSTRAINT alias_idx UNIQUE (alias_username, alias_domain)
+ domain VARCHAR(64) DEFAULT '' NOT NULL
);
+CREATE INDEX alias_user_idx ON dbaliases (alias_username);
+CREATE INDEX alias_idx ON dbaliases (alias_username, alias_domain);
CREATE INDEX target_idx ON dbaliases (username, domain);
diff --git a/utils/kamctl/oracle/alias_db-create.sql
b/utils/kamctl/oracle/alias_db-create.sql
index 57a9ba9..03ec78a 100644
--- a/utils/kamctl/oracle/alias_db-create.sql
+++ b/utils/kamctl/oracle/alias_db-create.sql
@@ -4,8 +4,7 @@ CREATE TABLE dbaliases (
alias_username VARCHAR2(64) DEFAULT '',
alias_domain VARCHAR2(64) DEFAULT '',
username VARCHAR2(64) DEFAULT '',
- domain VARCHAR2(64) DEFAULT '',
- CONSTRAINT dbaliases_alias_idx UNIQUE (alias_username, alias_domain)
+ domain VARCHAR2(64) DEFAULT ''
);
CREATE OR REPLACE TRIGGER dbaliases_tr
@@ -16,5 +15,7 @@ END dbaliases_tr;
/
BEGIN map2users('dbaliases'); END;
/
+CREATE INDEX dbaliases_alias_user_idx ON dbaliases (alias_username);
+CREATE INDEX dbaliases_alias_idx ON dbaliases (alias_username, alias_domain);
CREATE INDEX dbaliases_target_idx ON dbaliases (username, domain);
diff --git a/utils/kamctl/postgres/alias_db-create.sql
b/utils/kamctl/postgres/alias_db-create.sql
index 1bf29ea..5947b02 100644
--- a/utils/kamctl/postgres/alias_db-create.sql
+++ b/utils/kamctl/postgres/alias_db-create.sql
@@ -4,9 +4,10 @@ CREATE TABLE dbaliases (
alias_username VARCHAR(64) DEFAULT '' NOT NULL,
alias_domain VARCHAR(64) DEFAULT '' NOT NULL,
username VARCHAR(64) DEFAULT '' NOT NULL,
- domain VARCHAR(64) DEFAULT '' NOT NULL,
- CONSTRAINT dbaliases_alias_idx UNIQUE (alias_username, alias_domain)
+ domain VARCHAR(64) DEFAULT '' NOT NULL
);
+CREATE INDEX dbaliases_alias_user_idx ON dbaliases (alias_username);
+CREATE INDEX dbaliases_alias_idx ON dbaliases (alias_username, alias_domain);
CREATE INDEX dbaliases_target_idx ON dbaliases (username, domain);