[sr-dev] git:pd/crocodile: srdb1, modules_k/presence_xml, modules_k/xcap_server: Updated xcap table version from 3 to 4

Peter Dunkley peter.dunkley at crocodile-rcs.com
Wed Jul 27 15:47:36 CEST 2011


Module: sip-router
Branch: pd/crocodile
Commit: 7545c62ab6dd98127149a0dfcc7e4818e3e6faa2
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7545c62ab6dd98127149a0dfcc7e4818e3e6faa2

Author: pd <peter.dunkley at crocodile-rcs.com>
Committer: pd <peter.dunkley at crocodile-rcs.com>
Date:   Wed Jul 27 14:44:39 2011 +0100

srdb1, modules_k/presence_xml, modules_k/xcap_server: Updated xcap table version from 3 to 4

- Also fixed a merge issue where I copied the PostgreSQL version of
  presence-create.sql over the MySQL one.

---

 lib/srdb1/schema/pr_xcap.xml               |    2 +-
 modules_k/presence_xml/presence_xml.c      |    2 +-
 modules_k/xcap_server/xcap_server.c        |    2 +-
 utils/kamctl/db_berkeley/kamailio/version  |    2 +-
 utils/kamctl/db_sqlite/presence-create.sql |    2 +-
 utils/kamctl/dbtext/kamailio/version       |    2 +-
 utils/kamctl/mysql/presence-create.sql     |   72 ++++++++++++++--------------
 utils/kamctl/oracle/presence-create.sql    |    2 +-
 utils/kamctl/postgres/presence-create.sql  |    2 +-
 9 files changed, 44 insertions(+), 44 deletions(-)

diff --git a/lib/srdb1/schema/pr_xcap.xml b/lib/srdb1/schema/pr_xcap.xml
index ef30273..be7aa97 100644
--- a/lib/srdb1/schema/pr_xcap.xml
+++ b/lib/srdb1/schema/pr_xcap.xml
@@ -9,7 +9,7 @@
 
 <table id="xcap" xmlns:db="http://docbook.org/ns/docbook">
     <name>xcap</name>
-    <version>3</version>
+    <version>4</version>
     <type db="mysql">&MYSQL_TABLE_TYPE;</type>
     <description>
         <db:para>Table for the presence module. More information can be found at: &KAMAILIO_MOD_DOC;presence.html
diff --git a/modules_k/presence_xml/presence_xml.c b/modules_k/presence_xml/presence_xml.c
index f210460..e3bb8f2 100644
--- a/modules_k/presence_xml/presence_xml.c
+++ b/modules_k/presence_xml/presence_xml.c
@@ -59,7 +59,7 @@
 #include "presence_xml.h"
 
 MODULE_VERSION
-#define S_TABLE_VERSION 3
+#define S_TABLE_VERSION 4
 
 /** module functions */
 
diff --git a/modules_k/xcap_server/xcap_server.c b/modules_k/xcap_server/xcap_server.c
index db1e0f5..4c0aa30 100644
--- a/modules_k/xcap_server/xcap_server.c
+++ b/modules_k/xcap_server/xcap_server.c
@@ -49,7 +49,7 @@
 
 MODULE_VERSION
 
-#define XCAP_TABLE_VERSION   3
+#define XCAP_TABLE_VERSION   4
 
 
 static int xcaps_put_db(str* user, str *domain, xcap_uri_t *xuri, str *etag,
diff --git a/utils/kamctl/db_berkeley/kamailio/version b/utils/kamctl/db_berkeley/kamailio/version
index c533ac2..74a5b86 100644
--- a/utils/kamctl/db_berkeley/kamailio/version
+++ b/utils/kamctl/db_berkeley/kamailio/version
@@ -105,4 +105,4 @@ usr_preferences|2
 watchers|
 watchers|3
 xcap|
-xcap|3
+xcap|4
diff --git a/utils/kamctl/db_sqlite/presence-create.sql b/utils/kamctl/db_sqlite/presence-create.sql
index c2bedf4..c6fa4c2 100644
--- a/utils/kamctl/db_sqlite/presence-create.sql
+++ b/utils/kamctl/db_sqlite/presence-create.sql
@@ -51,7 +51,7 @@ CREATE TABLE watchers (
     CONSTRAINT watchers_watcher_idx UNIQUE (presentity_uri, watcher_username, watcher_domain, event)
 );
 
-INSERT INTO version (table_name, table_version) values ('xcap','3');
+INSERT INTO version (table_name, table_version) values ('xcap','4');
 CREATE TABLE xcap (
     id INTEGER PRIMARY KEY NOT NULL,
     username VARCHAR(64) NOT NULL,
diff --git a/utils/kamctl/dbtext/kamailio/version b/utils/kamctl/dbtext/kamailio/version
index 4410f97..009f2e1 100644
--- a/utils/kamctl/dbtext/kamailio/version
+++ b/utils/kamctl/dbtext/kamailio/version
@@ -47,4 +47,4 @@ uri:1
 userblacklist:1
 usr_preferences:2
 watchers:3
-xcap:3
+xcap:4
diff --git a/utils/kamctl/mysql/presence-create.sql b/utils/kamctl/mysql/presence-create.sql
index 3b2608c..2a404e2 100644
--- a/utils/kamctl/mysql/presence-create.sql
+++ b/utils/kamctl/mysql/presence-create.sql
@@ -1,20 +1,20 @@
 INSERT INTO version (table_name, table_version) values ('presentity','3');
 CREATE TABLE presentity (
-    id SERIAL PRIMARY KEY NOT NULL,
+    id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
     username VARCHAR(64) NOT NULL,
     domain VARCHAR(64) NOT NULL,
     event VARCHAR(64) NOT NULL,
     etag VARCHAR(64) NOT NULL,
-    expires INTEGER NOT NULL,
-    received_time INTEGER NOT NULL,
-    body BYTEA NOT NULL,
+    expires INT(11) NOT NULL,
+    received_time INT(11) NOT NULL,
+    body BLOB NOT NULL,
     sender VARCHAR(128) NOT NULL,
-    CONSTRAINT presentity_presentity_idx UNIQUE (username, domain, event, etag)
-);
+    CONSTRAINT presentity_idx UNIQUE (username, domain, event, etag)
+) ENGINE=MyISAM;
 
 INSERT INTO version (table_name, table_version) values ('active_watchers','9');
 CREATE TABLE active_watchers (
-    id SERIAL PRIMARY KEY NOT NULL,
+    id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
     presentity_uri VARCHAR(128) NOT NULL,
     watcher_username VARCHAR(64) NOT NULL,
     watcher_domain VARCHAR(64) NOT NULL,
@@ -25,68 +25,68 @@ CREATE TABLE active_watchers (
     to_tag VARCHAR(64) NOT NULL,
     from_tag VARCHAR(64) NOT NULL,
     callid VARCHAR(255) NOT NULL,
-    local_cseq INTEGER NOT NULL,
-    remote_cseq INTEGER NOT NULL,
+    local_cseq INT(11) NOT NULL,
+    remote_cseq INT(11) NOT NULL,
     contact VARCHAR(128) NOT NULL,
     record_route TEXT,
-    expires INTEGER NOT NULL,
-    status INTEGER DEFAULT 2 NOT NULL,
+    expires INT(11) NOT NULL,
+    status INT(11) DEFAULT 2 NOT NULL,
     reason VARCHAR(64) NOT NULL,
-    version INTEGER DEFAULT 0 NOT NULL,
+    version INT(11) DEFAULT 0 NOT NULL,
     socket_info VARCHAR(64) NOT NULL,
     local_contact VARCHAR(128) NOT NULL,
-    CONSTRAINT active_watchers_active_watchers_idx UNIQUE (presentity_uri, callid, to_tag, from_tag)
-);
+    CONSTRAINT active_watchers_idx UNIQUE (presentity_uri, callid, to_tag, from_tag)
+) ENGINE=MyISAM;
 
 INSERT INTO version (table_name, table_version) values ('watchers','3');
 CREATE TABLE watchers (
-    id SERIAL PRIMARY KEY NOT NULL,
+    id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
     presentity_uri VARCHAR(128) NOT NULL,
     watcher_username VARCHAR(64) NOT NULL,
     watcher_domain VARCHAR(64) NOT NULL,
     event VARCHAR(64) DEFAULT 'presence' NOT NULL,
-    status INTEGER NOT NULL,
+    status INT(11) NOT NULL,
     reason VARCHAR(64),
-    inserted_time INTEGER NOT NULL,
-    CONSTRAINT watchers_watcher_idx UNIQUE (presentity_uri, watcher_username, watcher_domain, event)
-);
+    inserted_time INT(11) NOT NULL,
+    CONSTRAINT watcher_idx UNIQUE (presentity_uri, watcher_username, watcher_domain, event)
+) ENGINE=MyISAM;
 
-INSERT INTO version (table_name, table_version) values ('xcap','3');
+INSERT INTO version (table_name, table_version) values ('xcap','4');
 CREATE TABLE xcap (
-    id SERIAL PRIMARY KEY NOT NULL,
+    id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
     username VARCHAR(64) NOT NULL,
     domain VARCHAR(64) NOT NULL,
-    doc BYTEA NOT NULL,
-    doc_type INTEGER NOT NULL,
+    doc MEDIUMBLOB NOT NULL,
+    doc_type INT(11) NOT NULL,
     etag VARCHAR(64) NOT NULL,
-    source INTEGER NOT NULL,
+    source INT(11) NOT NULL,
     doc_uri VARCHAR(128) NOT NULL,
-    port INTEGER NOT NULL,
-    CONSTRAINT xcap_account_doc_type_idx UNIQUE (username, domain, doc_type, doc_uri)
-);
+    port INT(11) NOT NULL,
+    CONSTRAINT account_doc_type_idx UNIQUE (username, domain, doc_type, doc_uri)
+) ENGINE=MyISAM;
 
-CREATE INDEX xcap_source_idx ON xcap (source);
+CREATE INDEX source_idx ON xcap (source);
 
 INSERT INTO version (table_name, table_version) values ('pua','6');
 CREATE TABLE pua (
-    id SERIAL PRIMARY KEY NOT NULL,
+    id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
     pres_uri VARCHAR(128) NOT NULL,
     pres_id VARCHAR(255) NOT NULL,
-    event INTEGER NOT NULL,
-    expires INTEGER NOT NULL,
-    desired_expires INTEGER NOT NULL,
-    flag INTEGER NOT NULL,
+    event INT(11) NOT NULL,
+    expires INT(11) NOT NULL,
+    desired_expires INT(11) NOT NULL,
+    flag INT(11) NOT NULL,
     etag VARCHAR(64) NOT NULL,
     tuple_id VARCHAR(64),
     watcher_uri VARCHAR(128) NOT NULL,
     call_id VARCHAR(128) NOT NULL,
     to_tag VARCHAR(64) NOT NULL,
     from_tag VARCHAR(64) NOT NULL,
-    cseq INTEGER NOT NULL,
+    cseq INT(11) NOT NULL,
     record_route TEXT,
     contact VARCHAR(128) NOT NULL,
     remote_contact VARCHAR(128) NOT NULL,
-    version INTEGER NOT NULL,
+    version INT(11) NOT NULL,
     extra_headers TEXT NOT NULL
-);
+) ENGINE=MyISAM;
 
diff --git a/utils/kamctl/oracle/presence-create.sql b/utils/kamctl/oracle/presence-create.sql
index 5c6e1f2..e5f01f6 100644
--- a/utils/kamctl/oracle/presence-create.sql
+++ b/utils/kamctl/oracle/presence-create.sql
@@ -75,7 +75,7 @@ END watchers_tr;
 /
 BEGIN map2users('watchers'); END;
 /
-INSERT INTO version (table_name, table_version) values ('xcap','3');
+INSERT INTO version (table_name, table_version) values ('xcap','4');
 CREATE TABLE xcap (
     id NUMBER(10) PRIMARY KEY,
     username VARCHAR2(64),
diff --git a/utils/kamctl/postgres/presence-create.sql b/utils/kamctl/postgres/presence-create.sql
index 3b2608c..aca4fe5 100644
--- a/utils/kamctl/postgres/presence-create.sql
+++ b/utils/kamctl/postgres/presence-create.sql
@@ -51,7 +51,7 @@ CREATE TABLE watchers (
     CONSTRAINT watchers_watcher_idx UNIQUE (presentity_uri, watcher_username, watcher_domain, event)
 );
 
-INSERT INTO version (table_name, table_version) values ('xcap','3');
+INSERT INTO version (table_name, table_version) values ('xcap','4');
 CREATE TABLE xcap (
     id SERIAL PRIMARY KEY NOT NULL,
     username VARCHAR(64) NOT NULL,




More information about the sr-dev mailing list