Module: sip-router
Branch: master
Commit: 3dde3b652f8ceb7300cf8ac3b4ce4a04dcf6b642
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3dde3b6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Sep 8 16:05:42 2011 +0200
kamctl: regenerated sql scripts from latest db schema
---
utils/kamctl/db_sqlite/mtree-create.sql | 9 +++++++++
utils/kamctl/db_sqlite/presence-create.sql | 2 +-
utils/kamctl/mysql/mtree-create.sql | 9 +++++++++
utils/kamctl/mysql/presence-create.sql | 2 +-
utils/kamctl/oracle/mtree-create.sql | 17 +++++++++++++++++
utils/kamctl/oracle/presence-create.sql | 2 +-
utils/kamctl/postgres/mtree-create.sql | 9 +++++++++
utils/kamctl/postgres/presence-create.sql | 2 +-
8 files changed, 48 insertions(+), 4 deletions(-)
diff --git a/utils/kamctl/db_sqlite/mtree-create.sql
b/utils/kamctl/db_sqlite/mtree-create.sql
index 9b6f56f..77c0e38 100644
--- a/utils/kamctl/db_sqlite/mtree-create.sql
+++ b/utils/kamctl/db_sqlite/mtree-create.sql
@@ -6,3 +6,12 @@ CREATE TABLE mtree (
CONSTRAINT mtree_tprefix_idx UNIQUE (tprefix)
);
+INSERT INTO version (table_name, table_version) values ('mtrees','1');
+CREATE TABLE mtrees (
+ id INTEGER PRIMARY KEY NOT NULL,
+ tname VARCHAR(128) DEFAULT '' NOT NULL,
+ tprefix VARCHAR(32) DEFAULT '' NOT NULL,
+ tvalue VARCHAR(128) DEFAULT '' NOT NULL,
+ CONSTRAINT mtrees_tname_tprefix_idx UNIQUE (tname, tprefix)
+);
+
diff --git a/utils/kamctl/db_sqlite/presence-create.sql
b/utils/kamctl/db_sqlite/presence-create.sql
index ae28db5..c99f3a9 100644
--- a/utils/kamctl/db_sqlite/presence-create.sql
+++ b/utils/kamctl/db_sqlite/presence-create.sql
@@ -60,7 +60,7 @@ CREATE TABLE xcap (
doc_type INTEGER NOT NULL,
etag VARCHAR(64) NOT NULL,
source INTEGER NOT NULL,
- doc_uri VARCHAR(128) NOT NULL,
+ doc_uri VARCHAR(255) NOT NULL,
port INTEGER NOT NULL,
CONSTRAINT xcap_account_doc_type_idx UNIQUE (username, domain, doc_type, doc_uri)
);
diff --git a/utils/kamctl/mysql/mtree-create.sql b/utils/kamctl/mysql/mtree-create.sql
index d3ecf46..8834163 100644
--- a/utils/kamctl/mysql/mtree-create.sql
+++ b/utils/kamctl/mysql/mtree-create.sql
@@ -6,3 +6,12 @@ CREATE TABLE mtree (
CONSTRAINT tprefix_idx UNIQUE (tprefix)
) ENGINE=MyISAM;
+INSERT INTO version (table_name, table_version) values ('mtrees','1');
+CREATE TABLE mtrees (
+ id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ tname VARCHAR(128) DEFAULT '' NOT NULL,
+ tprefix VARCHAR(32) DEFAULT '' NOT NULL,
+ tvalue VARCHAR(128) DEFAULT '' NOT NULL,
+ CONSTRAINT tname_tprefix_idx UNIQUE (tname, tprefix)
+) ENGINE=MyISAM;
+
diff --git a/utils/kamctl/mysql/presence-create.sql
b/utils/kamctl/mysql/presence-create.sql
index 6caa1f6..577ad81 100644
--- a/utils/kamctl/mysql/presence-create.sql
+++ b/utils/kamctl/mysql/presence-create.sql
@@ -60,7 +60,7 @@ CREATE TABLE xcap (
doc_type INT(11) NOT NULL,
etag VARCHAR(64) NOT NULL,
source INT(11) NOT NULL,
- doc_uri VARCHAR(128) NOT NULL,
+ doc_uri VARCHAR(255) NOT NULL,
port INT(11) NOT NULL,
CONSTRAINT account_doc_type_idx UNIQUE (username, domain, doc_type, doc_uri)
) ENGINE=MyISAM;
diff --git a/utils/kamctl/oracle/mtree-create.sql b/utils/kamctl/oracle/mtree-create.sql
index 7b74db4..f791897 100644
--- a/utils/kamctl/oracle/mtree-create.sql
+++ b/utils/kamctl/oracle/mtree-create.sql
@@ -14,3 +14,20 @@ END mtree_tr;
/
BEGIN map2users('mtree'); END;
/
+INSERT INTO version (table_name, table_version) values ('mtrees','1');
+CREATE TABLE mtrees (
+ id NUMBER(10) PRIMARY KEY,
+ tname VARCHAR2(128) DEFAULT '',
+ tprefix VARCHAR2(32) DEFAULT '',
+ tvalue VARCHAR2(128) DEFAULT '',
+ CONSTRAINT mtrees_tname_tprefix_idx UNIQUE (tname, tprefix)
+);
+
+CREATE OR REPLACE TRIGGER mtrees_tr
+before insert on mtrees FOR EACH ROW
+BEGIN
+ auto_id(:NEW.id);
+END mtrees_tr;
+/
+BEGIN map2users('mtrees'); END;
+/
diff --git a/utils/kamctl/oracle/presence-create.sql
b/utils/kamctl/oracle/presence-create.sql
index 97d99de..cd3dbf5 100644
--- a/utils/kamctl/oracle/presence-create.sql
+++ b/utils/kamctl/oracle/presence-create.sql
@@ -84,7 +84,7 @@ CREATE TABLE xcap (
doc_type NUMBER(10),
etag VARCHAR2(64),
source NUMBER(10),
- doc_uri VARCHAR2(128),
+ doc_uri VARCHAR2(255),
port NUMBER(10),
CONSTRAINT xcap_account_doc_type_idx UNIQUE (username, domain, doc_type, doc_uri)
);
diff --git a/utils/kamctl/postgres/mtree-create.sql
b/utils/kamctl/postgres/mtree-create.sql
index 6d60f20..a7d0164 100644
--- a/utils/kamctl/postgres/mtree-create.sql
+++ b/utils/kamctl/postgres/mtree-create.sql
@@ -6,3 +6,12 @@ CREATE TABLE mtree (
CONSTRAINT mtree_tprefix_idx UNIQUE (tprefix)
);
+INSERT INTO version (table_name, table_version) values ('mtrees','1');
+CREATE TABLE mtrees (
+ id SERIAL PRIMARY KEY NOT NULL,
+ tname VARCHAR(128) DEFAULT '' NOT NULL,
+ tprefix VARCHAR(32) DEFAULT '' NOT NULL,
+ tvalue VARCHAR(128) DEFAULT '' NOT NULL,
+ CONSTRAINT mtrees_tname_tprefix_idx UNIQUE (tname, tprefix)
+);
+
diff --git a/utils/kamctl/postgres/presence-create.sql
b/utils/kamctl/postgres/presence-create.sql
index 2c74fef..104e5bf 100644
--- a/utils/kamctl/postgres/presence-create.sql
+++ b/utils/kamctl/postgres/presence-create.sql
@@ -60,7 +60,7 @@ CREATE TABLE xcap (
doc_type INTEGER NOT NULL,
etag VARCHAR(64) NOT NULL,
source INTEGER NOT NULL,
- doc_uri VARCHAR(128) NOT NULL,
+ doc_uri VARCHAR(255) NOT NULL,
port INTEGER NOT NULL,
CONSTRAINT xcap_account_doc_type_idx UNIQUE (username, domain, doc_type, doc_uri)
);