Module: sip-router
Branch: master
Commit: e09ace60ef5b9db270e25e6b27d27e894a71d338
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e09ace6…
Author: Henning Westerholt <henning.westerholt(a)1und1.de>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Thu Oct 1 18:42:54 2009 +0200
lcr: regenerate database tables
---
tools/kamctl/db_berkeley/kamailio/gw | 6 +++---
tools/kamctl/db_berkeley/kamailio/lcr | 6 +++---
tools/kamctl/db_berkeley/kamailio/version | 4 ++--
tools/kamctl/dbtext/kamailio/gw | 2 +-
tools/kamctl/dbtext/kamailio/lcr | 2 +-
tools/kamctl/dbtext/kamailio/version | 4 ++--
tools/kamctl/mysql/lcr-create.sql | 16 +++++++---------
tools/kamctl/oracle/lcr-create.sql | 16 +++++++---------
tools/kamctl/postgres/lcr-create.sql | 16 +++++++---------
9 files changed, 33 insertions(+), 39 deletions(-)
diff --git a/tools/kamctl/db_berkeley/kamailio/gw b/tools/kamctl/db_berkeley/kamailio/gw
index b4383ed..d847ca8 100644
--- a/tools/kamctl/db_berkeley/kamailio/gw
+++ b/tools/kamctl/db_berkeley/kamailio/gw
@@ -1,10 +1,10 @@
METADATA_COLUMNS
-id(int) gw_name(str) grp_id(int) ip_addr(str) hostname(str) port(int) uri_scheme(int)
transport(int) strip(int) tag(str) weight(int) ping(int) flags(int)
+id(int) lcr_id(int) gw_name(str) grp_id(int) ip_addr(str) hostname(str) port(int)
uri_scheme(int) transport(int) strip(int) tag(str) weight(int) flags(int) defunct(int)
METADATA_KEY
-1
+2
METADATA_READONLY
0
METADATA_LOGFLAGS
0
METADATA_DEFAULTS
-NIL|NIL|NIL|NIL|NIL|NIL|NIL|NIL|NIL|NULL|NIL|0|0
+NIL|NIL|NIL|NIL|NIL|NIL|NIL|NIL|NIL|NIL|NULL|NIL|0|NULL
diff --git a/tools/kamctl/db_berkeley/kamailio/lcr
b/tools/kamctl/db_berkeley/kamailio/lcr
index b096dd0..6741a3a 100644
--- a/tools/kamctl/db_berkeley/kamailio/lcr
+++ b/tools/kamctl/db_berkeley/kamailio/lcr
@@ -1,10 +1,10 @@
METADATA_COLUMNS
-id(int) prefix(str) from_uri(str) grp_id(int) priority(int)
+id(int) lcr_id(int) prefix(str) from_uri(str) grp_id(int) priority(int)
METADATA_KEY
-1
+2
METADATA_READONLY
0
METADATA_LOGFLAGS
0
METADATA_DEFAULTS
-NIL|NULL|NULL|NIL|NIL
+NIL|NIL|NULL|NULL|NIL|NIL
diff --git a/tools/kamctl/db_berkeley/kamailio/version
b/tools/kamctl/db_berkeley/kamailio/version
index 71c794a..d977706 100644
--- a/tools/kamctl/db_berkeley/kamailio/version
+++ b/tools/kamctl/db_berkeley/kamailio/version
@@ -43,7 +43,7 @@ globalblacklist|1
grp|
grp|2
gw|
-gw|9
+gw|10
htable|
htable|1
imc_members|
@@ -51,7 +51,7 @@ imc_members|1
imc_rooms|
imc_rooms|1
lcr|
-lcr|2
+lcr|3
location|
location|1004
missed_calls|
diff --git a/tools/kamctl/dbtext/kamailio/gw b/tools/kamctl/dbtext/kamailio/gw
index dbfec36..9ec1033 100644
--- a/tools/kamctl/dbtext/kamailio/gw
+++ b/tools/kamctl/dbtext/kamailio/gw
@@ -1 +1 @@
-id(int,auto) gw_name(string) grp_id(int) ip_addr(string) hostname(string,null)
port(int,null) uri_scheme(int,null) transport(int,null) strip(int,null) tag(string,null)
weight(int,null) ping(int) flags(int)
+id(int,auto) lcr_id(int) gw_name(string) grp_id(int) ip_addr(string)
hostname(string,null) port(int,null) uri_scheme(int,null) transport(int,null)
strip(int,null) tag(string,null) weight(int,null) flags(int) defunct(int,null)
diff --git a/tools/kamctl/dbtext/kamailio/lcr b/tools/kamctl/dbtext/kamailio/lcr
index 559eb0b..60d2d39 100644
--- a/tools/kamctl/dbtext/kamailio/lcr
+++ b/tools/kamctl/dbtext/kamailio/lcr
@@ -1 +1 @@
-id(int,auto) prefix(string,null) from_uri(string,null) grp_id(int) priority(int)
+id(int,auto) lcr_id(int) prefix(string,null) from_uri(string,null) grp_id(int)
priority(int)
diff --git a/tools/kamctl/dbtext/kamailio/version b/tools/kamctl/dbtext/kamailio/version
index 56bcea1..2822a7a 100644
--- a/tools/kamctl/dbtext/kamailio/version
+++ b/tools/kamctl/dbtext/kamailio/version
@@ -16,11 +16,11 @@ domain_name:1
domainpolicy:2
globalblacklist:1
grp:2
-gw:9
+gw:10
htable:1
imc_members:1
imc_rooms:1
-lcr:2
+lcr:3
location:1004
missed_calls:3
pdt:1
diff --git a/tools/kamctl/mysql/lcr-create.sql b/tools/kamctl/mysql/lcr-create.sql
index e9ef511..1c6db01 100644
--- a/tools/kamctl/mysql/lcr-create.sql
+++ b/tools/kamctl/mysql/lcr-create.sql
@@ -1,6 +1,7 @@
-INSERT INTO version (table_name, table_version) values ('gw','9');
+INSERT INTO version (table_name, table_version) values ('gw','10');
CREATE TABLE gw (
id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ lcr_id SMALLINT UNSIGNED NOT NULL,
gw_name VARCHAR(128) NOT NULL,
grp_id INT UNSIGNED NOT NULL,
ip_addr VARCHAR(15) NOT NULL,
@@ -11,23 +12,20 @@ CREATE TABLE gw (
strip TINYINT UNSIGNED,
tag VARCHAR(16) DEFAULT NULL,
weight INT UNSIGNED,
- ping TINYINT UNSIGNED DEFAULT 0 NOT NULL,
flags INT UNSIGNED DEFAULT 0 NOT NULL,
- CONSTRAINT gw_name_idx UNIQUE (gw_name)
+ defunct INT UNSIGNED DEFAULT NULL,
+ CONSTRAINT lcr_id_gw_name_idx UNIQUE (lcr_id, gw_name)
) ENGINE=MyISAM;
-CREATE INDEX grp_id_idx ON gw (grp_id);
-
-INSERT INTO version (table_name, table_version) values ('lcr','2');
+INSERT INTO version (table_name, table_version) values ('lcr','3');
CREATE TABLE lcr (
id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ lcr_id SMALLINT UNSIGNED NOT NULL,
prefix VARCHAR(16) DEFAULT NULL,
from_uri VARCHAR(64) DEFAULT NULL,
grp_id INT UNSIGNED NOT NULL,
priority TINYINT UNSIGNED NOT NULL
) ENGINE=MyISAM;
-CREATE INDEX prefix_idx ON lcr (prefix);
-CREATE INDEX from_uri_idx ON lcr (from_uri);
-CREATE INDEX grp_id_idx ON lcr (grp_id);
+CREATE INDEX lcr_id_idx ON lcr (lcr_id);
diff --git a/tools/kamctl/oracle/lcr-create.sql b/tools/kamctl/oracle/lcr-create.sql
index 0b2915e..1dc954a 100644
--- a/tools/kamctl/oracle/lcr-create.sql
+++ b/tools/kamctl/oracle/lcr-create.sql
@@ -1,6 +1,7 @@
-INSERT INTO version (table_name, table_version) values ('gw','9');
+INSERT INTO version (table_name, table_version) values ('gw','10');
CREATE TABLE gw (
id NUMBER(10) PRIMARY KEY,
+ lcr_id NUMBER(5),
gw_name VARCHAR2(128),
grp_id NUMBER(10),
ip_addr VARCHAR2(15),
@@ -11,9 +12,9 @@ CREATE TABLE gw (
strip NUMBER(5),
tag VARCHAR2(16) DEFAULT NULL,
weight NUMBER(10),
- ping NUMBER(5) DEFAULT 0 NOT NULL,
flags NUMBER(10) DEFAULT 0 NOT NULL,
- CONSTRAINT gw_gw_name_idx UNIQUE (gw_name)
+ defunct NUMBER(10) DEFAULT NULL,
+ CONSTRAINT gw_lcr_id_gw_name_idx UNIQUE (lcr_id, gw_name)
);
CREATE OR REPLACE TRIGGER gw_tr
@@ -24,11 +25,10 @@ END gw_tr;
/
BEGIN map2users('gw'); END;
/
-CREATE INDEX gw_grp_id_idx ON gw (grp_id);
-
-INSERT INTO version (table_name, table_version) values ('lcr','2');
+INSERT INTO version (table_name, table_version) values ('lcr','3');
CREATE TABLE lcr (
id NUMBER(10) PRIMARY KEY,
+ lcr_id NUMBER(5),
prefix VARCHAR2(16) DEFAULT NULL,
from_uri VARCHAR2(64) DEFAULT NULL,
grp_id NUMBER(10),
@@ -43,7 +43,5 @@ END lcr_tr;
/
BEGIN map2users('lcr'); END;
/
-CREATE INDEX lcr_prefix_idx ON lcr (prefix);
-CREATE INDEX lcr_from_uri_idx ON lcr (from_uri);
-CREATE INDEX lcr_grp_id_idx ON lcr (grp_id);
+CREATE INDEX lcr_lcr_id_idx ON lcr (lcr_id);
diff --git a/tools/kamctl/postgres/lcr-create.sql b/tools/kamctl/postgres/lcr-create.sql
index 4ee6971..834ea08 100644
--- a/tools/kamctl/postgres/lcr-create.sql
+++ b/tools/kamctl/postgres/lcr-create.sql
@@ -1,6 +1,7 @@
-INSERT INTO version (table_name, table_version) values ('gw','9');
+INSERT INTO version (table_name, table_version) values ('gw','10');
CREATE TABLE gw (
id SERIAL PRIMARY KEY NOT NULL,
+ lcr_id SMALLINT NOT NULL,
gw_name VARCHAR(128) NOT NULL,
grp_id INTEGER NOT NULL,
ip_addr VARCHAR(15) NOT NULL,
@@ -11,23 +12,20 @@ CREATE TABLE gw (
strip SMALLINT,
tag VARCHAR(16) DEFAULT NULL,
weight INTEGER,
- ping SMALLINT DEFAULT 0 NOT NULL,
flags INTEGER DEFAULT 0 NOT NULL,
- CONSTRAINT gw_gw_name_idx UNIQUE (gw_name)
+ defunct INTEGER DEFAULT NULL,
+ CONSTRAINT gw_lcr_id_gw_name_idx UNIQUE (lcr_id, gw_name)
);
-CREATE INDEX gw_grp_id_idx ON gw (grp_id);
-
-INSERT INTO version (table_name, table_version) values ('lcr','2');
+INSERT INTO version (table_name, table_version) values ('lcr','3');
CREATE TABLE lcr (
id SERIAL PRIMARY KEY NOT NULL,
+ lcr_id SMALLINT NOT NULL,
prefix VARCHAR(16) DEFAULT NULL,
from_uri VARCHAR(64) DEFAULT NULL,
grp_id INTEGER NOT NULL,
priority SMALLINT NOT NULL
);
-CREATE INDEX lcr_prefix_idx ON lcr (prefix);
-CREATE INDEX lcr_from_uri_idx ON lcr (from_uri);
-CREATE INDEX lcr_grp_id_idx ON lcr (grp_id);
+CREATE INDEX lcr_lcr_id_idx ON lcr (lcr_id);