aboutsummaryrefslogtreecommitdiff
path: root/src/odbc
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2012-04-04 20:37:43 +1000
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2012-04-04 20:37:43 +1000
commit41a0eae0bd1b70a15225c8ed95fa8c86115191c6 (patch)
treee44d4c98844f9ee4df4abd0d17189839801522bc /src/odbc
parentODBC support for mod_irc (diff)
ODBC support for mod_shared_roster
Diffstat (limited to 'src/odbc')
-rw-r--r--src/odbc/mysql.sql15
-rw-r--r--src/odbc/pg.sql15
2 files changed, 30 insertions, 0 deletions
diff --git a/src/odbc/mysql.sql b/src/odbc/mysql.sql
index e57b135ed..c2611b0d2 100644
--- a/src/odbc/mysql.sql
+++ b/src/odbc/mysql.sql
@@ -59,6 +59,21 @@ CREATE TABLE rostergroups (
CREATE INDEX pk_rosterg_user_jid ON rostergroups(username(75), jid(75));
+CREATE TABLE sr_group (
+ name varchar(250) NOT NULL,
+ opts text NOT NULL,
+ created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
+) CHARACTER SET utf8;
+
+CREATE TABLE sr_user (
+ jid varchar(250) NOT NULL,
+ grp varchar(250) NOT NULL,
+ created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
+) CHARACTER SET utf8;
+
+CREATE UNIQUE INDEX i_sr_user_jid_group ON sr_user(jid(75), grp(75));
+CREATE INDEX i_sr_user_jid ON sr_user(jid);
+CREATE INDEX i_sr_user_grp ON sr_user(grp);
CREATE TABLE spool (
username varchar(250) NOT NULL,
diff --git a/src/odbc/pg.sql b/src/odbc/pg.sql
index 1abc84abf..a7d88d3de 100644
--- a/src/odbc/pg.sql
+++ b/src/odbc/pg.sql
@@ -57,6 +57,21 @@ CREATE TABLE rostergroups (
CREATE INDEX pk_rosterg_user_jid ON rostergroups USING btree (username, jid);
+CREATE TABLE sr_group (
+ name text NOT NULL,
+ opts text NOT NULL,
+ created_at TIMESTAMP NOT NULL DEFAULT now()
+);
+
+CREATE TABLE sr_user (
+ jid text NOT NULL,
+ grp text NOT NULL,
+ created_at TIMESTAMP NOT NULL DEFAULT now()
+);
+
+CREATE UNIQUE INDEX i_sr_user_jid_grp ON sr_user USING btree (jid, grp);
+CREATE INDEX i_sr_user_jid ON sr_user USING btree (jid);
+CREATE INDEX i_sr_user_grp ON sr_user USING btree (grp);
CREATE TABLE spool (
username text NOT NULL,