Module: sip-router
Branch: master
Commit: 2a41fe4fd144bbe82259d1546674b1dd06897d19
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2a41fe4…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Tue Mar 20 16:54:18 2012 +0000
lib/srdb1/schema: Updated XCAP indices to fix MySQL primary key issue
- The previous commit was incorrect
---
lib/srdb1/schema/pr_xcap.xml | 1 +
utils/kamctl/db_sqlite/presence-create.sql | 2 +-
utils/kamctl/mysql/presence-create.sql | 2 +-
utils/kamctl/oracle/presence-create.sql | 2 +-
utils/kamctl/postgres/presence-create.sql | 2 +-
5 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib/srdb1/schema/pr_xcap.xml b/lib/srdb1/schema/pr_xcap.xml
index e0e42df..8aa3343 100644
--- a/lib/srdb1/schema/pr_xcap.xml
+++ b/lib/srdb1/schema/pr_xcap.xml
@@ -85,6 +85,7 @@
<index>
<name>doc_uri_idx</name>
+ <colref linkend="doc_uri"/>
<unique/>
</index>
diff --git a/utils/kamctl/db_sqlite/presence-create.sql
b/utils/kamctl/db_sqlite/presence-create.sql
index 96ba84e..f3f74fb 100644
--- a/utils/kamctl/db_sqlite/presence-create.sql
+++ b/utils/kamctl/db_sqlite/presence-create.sql
@@ -68,7 +68,7 @@ CREATE TABLE xcap (
source INTEGER NOT NULL,
doc_uri VARCHAR(255) NOT NULL,
port INTEGER NOT NULL,
- CONSTRAINT xcap_doc_uri_idx UNIQUE ()
+ CONSTRAINT xcap_doc_uri_idx UNIQUE (doc_uri)
);
CREATE INDEX xcap_account_doc_type_idx ON xcap (username, domain, doc_type);
diff --git a/utils/kamctl/mysql/presence-create.sql
b/utils/kamctl/mysql/presence-create.sql
index b052448..9bef393 100644
--- a/utils/kamctl/mysql/presence-create.sql
+++ b/utils/kamctl/mysql/presence-create.sql
@@ -68,7 +68,7 @@ CREATE TABLE xcap (
source INT(11) NOT NULL,
doc_uri VARCHAR(255) NOT NULL,
port INT(11) NOT NULL,
- CONSTRAINT doc_uri_idx UNIQUE ()
+ CONSTRAINT doc_uri_idx UNIQUE (doc_uri)
) ENGINE=MyISAM;
CREATE INDEX account_doc_type_idx ON xcap (username, domain, doc_type);
diff --git a/utils/kamctl/oracle/presence-create.sql
b/utils/kamctl/oracle/presence-create.sql
index 52eaa48..1449e0d 100644
--- a/utils/kamctl/oracle/presence-create.sql
+++ b/utils/kamctl/oracle/presence-create.sql
@@ -92,7 +92,7 @@ CREATE TABLE xcap (
source NUMBER(10),
doc_uri VARCHAR2(255),
port NUMBER(10),
- CONSTRAINT xcap_doc_uri_idx UNIQUE ()
+ CONSTRAINT xcap_doc_uri_idx UNIQUE (doc_uri)
);
CREATE OR REPLACE TRIGGER xcap_tr
diff --git a/utils/kamctl/postgres/presence-create.sql
b/utils/kamctl/postgres/presence-create.sql
index c960bce..cba741c 100644
--- a/utils/kamctl/postgres/presence-create.sql
+++ b/utils/kamctl/postgres/presence-create.sql
@@ -68,7 +68,7 @@ CREATE TABLE xcap (
source INTEGER NOT NULL,
doc_uri VARCHAR(255) NOT NULL,
port INTEGER NOT NULL,
- CONSTRAINT xcap_doc_uri_idx UNIQUE ()
+ CONSTRAINT xcap_doc_uri_idx UNIQUE (doc_uri)
);
CREATE INDEX xcap_account_doc_type_idx ON xcap (username, domain, doc_type);