[sr-dev] git:3.3: kamctl: regeneration of sql creation scripts for pua table updates

Daniel-Constantin Mierla miconda at gmail.com
Fri Sep 14 13:03:19 CEST 2012


Module: sip-router
Branch: 3.3
Commit: 7b40fba5cfc04781c60a849bcb0e240c4e34413a
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7b40fba5cfc04781c60a849bcb0e240c4e34413a

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Fri Sep 14 13:02:01 2012 +0200

kamctl: regeneration of sql creation scripts for pua table updates

---

 utils/kamctl/db_sqlite/presence-create.sql |    4 ++--
 utils/kamctl/mysql/presence-create.sql     |    5 +++--
 utils/kamctl/oracle/presence-create.sql    |    4 ++--
 utils/kamctl/postgres/presence-create.sql  |    4 ++--
 4 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/utils/kamctl/db_sqlite/presence-create.sql b/utils/kamctl/db_sqlite/presence-create.sql
index a9a9157..4e25d80 100644
--- a/utils/kamctl/db_sqlite/presence-create.sql
+++ b/utils/kamctl/db_sqlite/presence-create.sql
@@ -102,10 +102,10 @@ CREATE TABLE pua (
     remote_contact VARCHAR(128) NOT NULL,
     version INTEGER NOT NULL,
     extra_headers TEXT NOT NULL,
-    CONSTRAINT pua_pua_idx UNIQUE (etag, tuple_id, call_id, from_tag),
-    CONSTRAINT pua_expires_idx UNIQUE (expires)
+    CONSTRAINT pua_pua_idx UNIQUE (etag, tuple_id, call_id, from_tag)
 );
 
+CREATE INDEX pua_expires_idx ON pua (expires);
 CREATE INDEX pua_dialog1_idx ON pua (call_id, from_tag, to_tag);
 CREATE INDEX pua_dialog2_idx ON pua (pres_id, pres_uri);
 CREATE INDEX pua_tmp_dlg1_idx ON pua (call_id, from_tag);
diff --git a/utils/kamctl/mysql/presence-create.sql b/utils/kamctl/mysql/presence-create.sql
index 7f68249..928521e 100644
--- a/utils/kamctl/mysql/presence-create.sql
+++ b/utils/kamctl/mysql/presence-create.sql
@@ -102,13 +102,14 @@ CREATE TABLE pua (
     remote_contact VARCHAR(128) NOT NULL,
     version INT(11) NOT NULL,
     extra_headers TEXT NOT NULL,
-    CONSTRAINT pua_idx UNIQUE (etag, tuple_id, call_id, from_tag),
+    CONSTRAINT pua_idx UNIQUE (etag, tuple_id, call_id, from_tag)
 ) ENGINE=MyISAM;
 
+CREATE INDEX expires_idx ON pua (expires);
 CREATE INDEX dialog1_idx ON pua (call_id, from_tag, to_tag);
 CREATE INDEX dialog2_idx ON pua (pres_id, pres_uri);
 CREATE INDEX tmp_dlg1_idx ON pua (call_id, from_tag);
 CREATE INDEX tmp_dlg2_idx ON pua (pres_id, pres_uri, call_id, from_tag);
 CREATE INDEX tmp_record1_idx ON pua (pres_id);
 CREATE INDEX tmp_record2_idx ON pua (pres_id, etag);
-CREATE INDEX expires_idx ON pua (expires);
+
diff --git a/utils/kamctl/oracle/presence-create.sql b/utils/kamctl/oracle/presence-create.sql
index bffdba2..a1c5528 100644
--- a/utils/kamctl/oracle/presence-create.sql
+++ b/utils/kamctl/oracle/presence-create.sql
@@ -134,8 +134,7 @@ CREATE TABLE pua (
     remote_contact VARCHAR2(128),
     version NUMBER(10),
     extra_headers CLOB,
-    CONSTRAINT pua_pua_idx  UNIQUE (etag, tuple_id, call_id, from_tag),
-    CONSTRAINT pua_expires_idx  UNIQUE (expires)
+    CONSTRAINT pua_pua_idx  UNIQUE (etag, tuple_id, call_id, from_tag)
 );
 
 CREATE OR REPLACE TRIGGER pua_tr
@@ -146,6 +145,7 @@ END pua_tr;
 /
 BEGIN map2users('pua'); END;
 /
+CREATE INDEX pua_expires_idx  ON pua (expires);
 CREATE INDEX pua_dialog1_idx  ON pua (call_id, from_tag, to_tag);
 CREATE INDEX pua_dialog2_idx  ON pua (pres_id, pres_uri);
 CREATE INDEX pua_tmp_dlg1_idx  ON pua (call_id, from_tag);
diff --git a/utils/kamctl/postgres/presence-create.sql b/utils/kamctl/postgres/presence-create.sql
index 1aacd99..cf3fe17 100644
--- a/utils/kamctl/postgres/presence-create.sql
+++ b/utils/kamctl/postgres/presence-create.sql
@@ -102,10 +102,10 @@ CREATE TABLE pua (
     remote_contact VARCHAR(128) NOT NULL,
     version INTEGER NOT NULL,
     extra_headers TEXT NOT NULL,
-    CONSTRAINT pua_pua_idx UNIQUE (etag, tuple_id, call_id, from_tag),
-    CONSTRAINT pua_expires_idx UNIQUE (expires)
+    CONSTRAINT pua_pua_idx UNIQUE (etag, tuple_id, call_id, from_tag)
 );
 
+CREATE INDEX pua_expires_idx ON pua (expires);
 CREATE INDEX pua_dialog1_idx ON pua (call_id, from_tag, to_tag);
 CREATE INDEX pua_dialog2_idx ON pua (pres_id, pres_uri);
 CREATE INDEX pua_tmp_dlg1_idx ON pua (call_id, from_tag);




More information about the sr-dev mailing list