Module: sip-router
Branch: master
Commit: e593683639abe5192a5da0ac1f3b4a35c45e00f3
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e593683…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Dec 23 09:35:25 2011 +0100
srdb1: schema update for address table of permissions module
- kamctl db scripts updated accordingly
---
lib/srdb1/schema/address.xml | 12 ++++++------
utils/kamctl/db_berkeley/kamailio/version | 2 +-
utils/kamctl/db_sqlite/permissions-create.sql | 8 ++++----
utils/kamctl/dbtext/kamailio/version | 2 +-
utils/kamctl/mysql/permissions-create.sql | 8 ++++----
utils/kamctl/oracle/permissions-create.sql | 8 ++++----
utils/kamctl/postgres/permissions-create.sql | 8 ++++----
7 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/lib/srdb1/schema/address.xml b/lib/srdb1/schema/address.xml
index 5369685..be380ee 100644
--- a/lib/srdb1/schema/address.xml
+++ b/lib/srdb1/schema/address.xml
@@ -9,7 +9,7 @@
<table id="address"
xmlns:db="http://docbook.org/ns/docbook">
<name>address</name>
- <version>4</version>
+ <version>5</version>
<type db="mysql">&MYSQL_TABLE_TYPE;</type>
<description>
<db:para>This table is used by the permissions module. More information is
available at: &KAMAILIO_MOD_DOC;permissions.html
@@ -28,8 +28,8 @@
<column>
<name>grp</name>
- <type>unsigned short</type>
- <size>5</size>
+ <type>unsigned int</type>
+ <size>11</size>
<default>1</default>
<description>Group</description>
<natural/>
@@ -38,15 +38,15 @@
<column>
<name>ip_addr</name>
<type>string</type>
- <size>15</size>
+ <size>48</size>
<description>IP address</description>
</column>
<column>
<name>mask</name>
- <type>char</type>
+ <type>int</type>
<default>32</default>
- <description>Network mask - integer equal or less than 32</description>
+ <description>Network mask - integer equal or less than 128</description>
</column>
<column>
diff --git a/utils/kamctl/db_berkeley/kamailio/version
b/utils/kamctl/db_berkeley/kamailio/version
index 98b5f87..09b177d 100644
--- a/utils/kamctl/db_berkeley/kamailio/version
+++ b/utils/kamctl/db_berkeley/kamailio/version
@@ -13,7 +13,7 @@ acc|4
active_watchers|
active_watchers|9
address|
-address|4
+address|5
aliases|
aliases|1004
carrier_name|
diff --git a/utils/kamctl/db_sqlite/permissions-create.sql
b/utils/kamctl/db_sqlite/permissions-create.sql
index ff3ac56..e0c3f59 100644
--- a/utils/kamctl/db_sqlite/permissions-create.sql
+++ b/utils/kamctl/db_sqlite/permissions-create.sql
@@ -9,12 +9,12 @@ CREATE TABLE trusted (
CREATE INDEX trusted_peer_idx ON trusted (src_ip);
-INSERT INTO version (table_name, table_version) values ('address','4');
+INSERT INTO version (table_name, table_version) values ('address','5');
CREATE TABLE address (
id INTEGER PRIMARY KEY NOT NULL,
- grp SMALLINT DEFAULT 1 NOT NULL,
- ip_addr VARCHAR(15) NOT NULL,
- mask SMALLINT DEFAULT 32 NOT NULL,
+ grp INTEGER DEFAULT 1 NOT NULL,
+ ip_addr VARCHAR(48) NOT NULL,
+ mask INTEGER DEFAULT 32 NOT NULL,
port SMALLINT DEFAULT 0 NOT NULL,
tag VARCHAR(64)
);
diff --git a/utils/kamctl/dbtext/kamailio/version b/utils/kamctl/dbtext/kamailio/version
index a41262e..d326bbf 100644
--- a/utils/kamctl/dbtext/kamailio/version
+++ b/utils/kamctl/dbtext/kamailio/version
@@ -1,7 +1,7 @@
table_name(string) table_version(int)
acc:4
active_watchers:9
-address:4
+address:5
aliases:1004
carrier_name:1
carrierfailureroute:2
diff --git a/utils/kamctl/mysql/permissions-create.sql
b/utils/kamctl/mysql/permissions-create.sql
index ae6ce8b..660ac6f 100644
--- a/utils/kamctl/mysql/permissions-create.sql
+++ b/utils/kamctl/mysql/permissions-create.sql
@@ -9,12 +9,12 @@ CREATE TABLE trusted (
CREATE INDEX peer_idx ON trusted (src_ip);
-INSERT INTO version (table_name, table_version) values ('address','4');
+INSERT INTO version (table_name, table_version) values ('address','5');
CREATE TABLE address (
id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
- grp SMALLINT(5) UNSIGNED DEFAULT 1 NOT NULL,
- ip_addr VARCHAR(15) NOT NULL,
- mask TINYINT DEFAULT 32 NOT NULL,
+ grp INT(11) UNSIGNED DEFAULT 1 NOT NULL,
+ ip_addr VARCHAR(48) NOT NULL,
+ mask INT DEFAULT 32 NOT NULL,
port SMALLINT(5) UNSIGNED DEFAULT 0 NOT NULL,
tag VARCHAR(64)
) ENGINE=MyISAM;
diff --git a/utils/kamctl/oracle/permissions-create.sql
b/utils/kamctl/oracle/permissions-create.sql
index 1e1b31c..6b934cc 100644
--- a/utils/kamctl/oracle/permissions-create.sql
+++ b/utils/kamctl/oracle/permissions-create.sql
@@ -17,12 +17,12 @@ BEGIN map2users('trusted'); END;
/
CREATE INDEX trusted_peer_idx ON trusted (src_ip);
-INSERT INTO version (table_name, table_version) values ('address','4');
+INSERT INTO version (table_name, table_version) values ('address','5');
CREATE TABLE address (
id NUMBER(10) PRIMARY KEY,
- grp NUMBER(5) DEFAULT 1 NOT NULL,
- ip_addr VARCHAR2(15),
- mask NUMBER(5) DEFAULT 32 NOT NULL,
+ grp NUMBER(10) DEFAULT 1 NOT NULL,
+ ip_addr VARCHAR2(48),
+ mask NUMBER(10) DEFAULT 32 NOT NULL,
port NUMBER(5) DEFAULT 0 NOT NULL,
tag VARCHAR2(64)
);
diff --git a/utils/kamctl/postgres/permissions-create.sql
b/utils/kamctl/postgres/permissions-create.sql
index 602c399..9e48623 100644
--- a/utils/kamctl/postgres/permissions-create.sql
+++ b/utils/kamctl/postgres/permissions-create.sql
@@ -9,12 +9,12 @@ CREATE TABLE trusted (
CREATE INDEX trusted_peer_idx ON trusted (src_ip);
-INSERT INTO version (table_name, table_version) values ('address','4');
+INSERT INTO version (table_name, table_version) values ('address','5');
CREATE TABLE address (
id SERIAL PRIMARY KEY NOT NULL,
- grp SMALLINT DEFAULT 1 NOT NULL,
- ip_addr VARCHAR(15) NOT NULL,
- mask SMALLINT DEFAULT 32 NOT NULL,
+ grp INTEGER DEFAULT 1 NOT NULL,
+ ip_addr VARCHAR(48) NOT NULL,
+ mask INTEGER DEFAULT 32 NOT NULL,
port SMALLINT DEFAULT 0 NOT NULL,
tag VARCHAR(64)
);