Module: kamailio
Branch: master
Commit: 2ddf88df7deeebf2966344031eb905811b8e86cb
URL:
https://github.com/kamailio/kamailio/commit/2ddf88df7deeebf2966344031eb9058…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-03-23T16:08:48+01:00
kamctl: refreshed definition of location table
---
Modified: utils/kamctl/db_sqlite/usrloc-create.sql
Modified: utils/kamctl/mysql/usrloc-create.sql
Modified: utils/kamctl/oracle/usrloc-create.sql
Modified: utils/kamctl/postgres/usrloc-create.sql
---
Diff:
https://github.com/kamailio/kamailio/commit/2ddf88df7deeebf2966344031eb9058…
Patch:
https://github.com/kamailio/kamailio/commit/2ddf88df7deeebf2966344031eb9058…
---
diff --git a/utils/kamctl/db_sqlite/usrloc-create.sql
b/utils/kamctl/db_sqlite/usrloc-create.sql
index 50f6894..6cbfbdd 100644
--- a/utils/kamctl/db_sqlite/usrloc-create.sql
+++ b/utils/kamctl/db_sqlite/usrloc-create.sql
@@ -22,12 +22,12 @@ CREATE TABLE location (
connection_id INTEGER DEFAULT 0 NOT NULL,
keepalive INTEGER DEFAULT 0 NOT NULL,
partition INTEGER DEFAULT 0 NOT NULL,
- CONSTRAINT location_ruid_idx UNIQUE (ruid),
- CONSTRAINT location_connection_idx UNIQUE (server_id, connection_id)
+ CONSTRAINT location_ruid_idx UNIQUE (ruid)
);
CREATE INDEX location_account_contact_idx ON location (username, domain, contact);
CREATE INDEX location_expires_idx ON location (expires);
+CREATE INDEX location_connection_idx ON location (server_id, connection_id);
INSERT INTO version (table_name, table_version) values ('location','8');
diff --git a/utils/kamctl/mysql/usrloc-create.sql b/utils/kamctl/mysql/usrloc-create.sql
index f7edfbb..a300661 100644
--- a/utils/kamctl/mysql/usrloc-create.sql
+++ b/utils/kamctl/mysql/usrloc-create.sql
@@ -22,12 +22,12 @@ CREATE TABLE `location` (
`connection_id` INT(11) DEFAULT 0 NOT NULL,
`keepalive` INT(11) DEFAULT 0 NOT NULL,
`partition` INT(11) DEFAULT 0 NOT NULL,
- CONSTRAINT ruid_idx UNIQUE (`ruid`),
- CONSTRAINT connection_idx UNIQUE (`server_id`, `connection_id`)
+ CONSTRAINT ruid_idx UNIQUE (`ruid`)
);
CREATE INDEX account_contact_idx ON location (`username`, `domain`, `contact`);
CREATE INDEX expires_idx ON location (`expires`);
+CREATE INDEX connection_idx ON location (`server_id`, `connection_id`);
INSERT INTO version (table_name, table_version) values ('location','8');
diff --git a/utils/kamctl/oracle/usrloc-create.sql
b/utils/kamctl/oracle/usrloc-create.sql
index 8ab1d98..7923229 100644
--- a/utils/kamctl/oracle/usrloc-create.sql
+++ b/utils/kamctl/oracle/usrloc-create.sql
@@ -22,8 +22,7 @@ CREATE TABLE location (
connection_id NUMBER(10) DEFAULT 0 NOT NULL,
keepalive NUMBER(10) DEFAULT 0 NOT NULL,
partition NUMBER(10) DEFAULT 0 NOT NULL,
- CONSTRAINT location_ruid_idx UNIQUE (ruid),
- CONSTRAINT location_connection_idx UNIQUE (server_id, connection_id)
+ CONSTRAINT location_ruid_idx UNIQUE (ruid)
);
CREATE OR REPLACE TRIGGER location_tr
@@ -36,6 +35,7 @@ BEGIN map2users('location'); END;
/
CREATE INDEX location_account_contact_idx ON location (username, domain, contact);
CREATE INDEX location_expires_idx ON location (expires);
+CREATE INDEX location_connection_idx ON location (server_id, connection_id);
INSERT INTO version (table_name, table_version) values ('location','8');
diff --git a/utils/kamctl/postgres/usrloc-create.sql
b/utils/kamctl/postgres/usrloc-create.sql
index a8102e3..9a56326 100644
--- a/utils/kamctl/postgres/usrloc-create.sql
+++ b/utils/kamctl/postgres/usrloc-create.sql
@@ -22,12 +22,12 @@ CREATE TABLE location (
connection_id INTEGER DEFAULT 0 NOT NULL,
keepalive INTEGER DEFAULT 0 NOT NULL,
partition INTEGER DEFAULT 0 NOT NULL,
- CONSTRAINT location_ruid_idx UNIQUE (ruid),
- CONSTRAINT location_connection_idx UNIQUE (server_id, connection_id)
+ CONSTRAINT location_ruid_idx UNIQUE (ruid)
);
CREATE INDEX location_account_contact_idx ON location (username, domain, contact);
CREATE INDEX location_expires_idx ON location (expires);
+CREATE INDEX location_connection_idx ON location (server_id, connection_id);
INSERT INTO version (table_name, table_version) values ('location','8');