Module: sip-router
Branch: master
Commit: 402fa77ed738e938c49ddf044feb98bc70b8c16c
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=402fa77…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Apr 18 17:36:02 2012 +0100
lib/srdb1, utils/kamctl: Updated rls_watchers table schema for RLS notifier changes
---
lib/srdb1/schema/rls_watchers.xml | 13 ++++++++++++-
utils/kamctl/db_sqlite/rls-create.sql | 4 +++-
utils/kamctl/mysql/rls-create.sql | 4 +++-
utils/kamctl/oracle/rls-create.sql | 4 +++-
utils/kamctl/postgres/rls-create.sql | 4 +++-
5 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/lib/srdb1/schema/rls_watchers.xml b/lib/srdb1/schema/rls_watchers.xml
index 5db70b0..bb56209 100644
--- a/lib/srdb1/schema/rls_watchers.xml
+++ b/lib/srdb1/schema/rls_watchers.xml
@@ -9,7 +9,7 @@
<table id="rls_watchers"
xmlns:db="http://docbook.org/ns/docbook">
<name>rls_watchers</name>
- <version>1</version>
+ <version>2</version>
<type db="mysql">&MYSQL_TABLE_TYPE;</type>
<description>
<db:para>Table for RLS module used for storing resource lists subscribe
@@ -173,6 +173,13 @@
<description>Local contact</description>
</column>
+ <column id="updated">
+ <name>updated</name>
+ <type>int</type>
+ <size>&expires_len;</size>
+ <description>Update flag</description>
+ </column>
+
<index>
<name>rls_watcher_idx</name>
<colref linkend="callid"/>
@@ -199,4 +206,8 @@
<colref linkend="expires"/>
</index>
+ <index>
+ <name>updated_idx</name>
+ <colref linkend="updated"/>
+ </index>
</table>
diff --git a/utils/kamctl/db_sqlite/rls-create.sql
b/utils/kamctl/db_sqlite/rls-create.sql
index ad6aa78..b8317a0 100644
--- a/utils/kamctl/db_sqlite/rls-create.sql
+++ b/utils/kamctl/db_sqlite/rls-create.sql
@@ -16,7 +16,7 @@ CREATE INDEX rls_presentity_rlsubs_idx ON rls_presentity (rlsubs_did);
CREATE INDEX rls_presentity_updated_idx ON rls_presentity (updated);
CREATE INDEX rls_presentity_expires_idx ON rls_presentity (expires);
-INSERT INTO version (table_name, table_version) values
('rls_watchers','1');
+INSERT INTO version (table_name, table_version) values
('rls_watchers','2');
CREATE TABLE rls_watchers (
id INTEGER PRIMARY KEY NOT NULL,
presentity_uri VARCHAR(128) NOT NULL,
@@ -39,10 +39,12 @@ CREATE TABLE rls_watchers (
version INTEGER DEFAULT 0 NOT NULL,
socket_info VARCHAR(64) NOT NULL,
local_contact VARCHAR(128) NOT NULL,
+ updated INTEGER NOT NULL,
CONSTRAINT rls_watchers_rls_watcher_idx UNIQUE (callid, to_tag, from_tag)
);
CREATE INDEX rls_watchers_rls_watchers_delete ON rls_watchers (callid, to_tag);
CREATE INDEX rls_watchers_rls_watchers_update ON rls_watchers (watcher_username,
watcher_domain, event);
CREATE INDEX rls_watchers_rls_watchers_expires ON rls_watchers (expires);
+CREATE INDEX rls_watchers_updated_idx ON rls_watchers (updated);
diff --git a/utils/kamctl/mysql/rls-create.sql b/utils/kamctl/mysql/rls-create.sql
index aa6d675..252a92a 100644
--- a/utils/kamctl/mysql/rls-create.sql
+++ b/utils/kamctl/mysql/rls-create.sql
@@ -16,7 +16,7 @@ CREATE INDEX rlsubs_idx ON rls_presentity (rlsubs_did);
CREATE INDEX updated_idx ON rls_presentity (updated);
CREATE INDEX expires_idx ON rls_presentity (expires);
-INSERT INTO version (table_name, table_version) values
('rls_watchers','1');
+INSERT INTO version (table_name, table_version) values
('rls_watchers','2');
CREATE TABLE rls_watchers (
id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
presentity_uri VARCHAR(128) NOT NULL,
@@ -39,10 +39,12 @@ CREATE TABLE rls_watchers (
version INT(11) DEFAULT 0 NOT NULL,
socket_info VARCHAR(64) NOT NULL,
local_contact VARCHAR(128) NOT NULL,
+ updated INT(11) NOT NULL,
CONSTRAINT rls_watcher_idx UNIQUE (callid, to_tag, from_tag)
) ENGINE=MyISAM;
CREATE INDEX rls_watchers_delete ON rls_watchers (callid, to_tag);
CREATE INDEX rls_watchers_update ON rls_watchers (watcher_username, watcher_domain,
event);
CREATE INDEX rls_watchers_expires ON rls_watchers (expires);
+CREATE INDEX updated_idx ON rls_watchers (updated);
diff --git a/utils/kamctl/oracle/rls-create.sql b/utils/kamctl/oracle/rls-create.sql
index 8507f81..63deff4 100644
--- a/utils/kamctl/oracle/rls-create.sql
+++ b/utils/kamctl/oracle/rls-create.sql
@@ -24,7 +24,7 @@ CREATE INDEX rls_presentity_rlsubs_idx ON rls_presentity (rlsubs_did);
CREATE INDEX rls_presentity_updated_idx ON rls_presentity (updated);
CREATE INDEX rls_presentity_expires_idx ON rls_presentity (expires);
-INSERT INTO version (table_name, table_version) values
('rls_watchers','1');
+INSERT INTO version (table_name, table_version) values
('rls_watchers','2');
CREATE TABLE rls_watchers (
id NUMBER(10) PRIMARY KEY,
presentity_uri VARCHAR2(128),
@@ -47,6 +47,7 @@ CREATE TABLE rls_watchers (
version NUMBER(10) DEFAULT 0 NOT NULL,
socket_info VARCHAR2(64),
local_contact VARCHAR2(128),
+ updated NUMBER(10),
CONSTRAINT rls_watchers_rls_watcher_idx UNIQUE (callid, to_tag, from_tag)
);
@@ -61,4 +62,5 @@ BEGIN map2users('rls_watchers'); END;
CREATE INDEX ORA_rls_watchers_delete ON rls_watchers (callid, to_tag);
CREATE INDEX ORA_rls_watchers_update ON rls_watchers (watcher_username, watcher_domain,
event);
CREATE INDEX ORA_rls_watchers_expires ON rls_watchers (expires);
+CREATE INDEX rls_watchers_updated_idx ON rls_watchers (updated);
diff --git a/utils/kamctl/postgres/rls-create.sql b/utils/kamctl/postgres/rls-create.sql
index 550f615..3d961ac 100644
--- a/utils/kamctl/postgres/rls-create.sql
+++ b/utils/kamctl/postgres/rls-create.sql
@@ -16,7 +16,7 @@ CREATE INDEX rls_presentity_rlsubs_idx ON rls_presentity (rlsubs_did);
CREATE INDEX rls_presentity_updated_idx ON rls_presentity (updated);
CREATE INDEX rls_presentity_expires_idx ON rls_presentity (expires);
-INSERT INTO version (table_name, table_version) values
('rls_watchers','1');
+INSERT INTO version (table_name, table_version) values
('rls_watchers','2');
CREATE TABLE rls_watchers (
id SERIAL PRIMARY KEY NOT NULL,
presentity_uri VARCHAR(128) NOT NULL,
@@ -39,10 +39,12 @@ CREATE TABLE rls_watchers (
version INTEGER DEFAULT 0 NOT NULL,
socket_info VARCHAR(64) NOT NULL,
local_contact VARCHAR(128) NOT NULL,
+ updated INTEGER NOT NULL,
CONSTRAINT rls_watchers_rls_watcher_idx UNIQUE (callid, to_tag, from_tag)
);
CREATE INDEX rls_watchers_rls_watchers_delete ON rls_watchers (callid, to_tag);
CREATE INDEX rls_watchers_rls_watchers_update ON rls_watchers (watcher_username,
watcher_domain, event);
CREATE INDEX rls_watchers_rls_watchers_expires ON rls_watchers (expires);
+CREATE INDEX rls_watchers_updated_idx ON rls_watchers (updated);