summaryrefslogtreecommitdiff
path: root/sql/lite.sql
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2017-10-31 14:00:41 +0100
committerChristophe Romain <christophe.romain@process-one.net>2017-10-31 14:00:41 +0100
commit0452ffc1dfa613397aab0968f46f5f5b235a42c5 (patch)
treee9c72ee77ed142f40de4b44c3ec8fb620d151c33 /sql/lite.sql
parentEnforce module_name/1 (diff)
Optimize muc subscriptions handling
Diffstat (limited to 'sql/lite.sql')
-rw-r--r--sql/lite.sql12
1 files changed, 12 insertions, 0 deletions
diff --git a/sql/lite.sql b/sql/lite.sql
index 44df0586..c2bc126f 100644
--- a/sql/lite.sql
+++ b/sql/lite.sql
@@ -290,6 +290,18 @@ CREATE TABLE muc_online_users (
CREATE UNIQUE INDEX i_muc_online_users ON muc_online_users (username, server, resource, name, host);
CREATE INDEX i_muc_online_users_us ON muc_online_users (username, server);
+CREATE TABLE muc_room_subscribers (
+ room text NOT NULL,
+ host text NOT NULL,
+ jid text NOT NULL,
+ nick text NOT NULL,
+ nodes text NOT NULL,
+ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
+);
+
+CREATE INDEX i_muc_room_subscribers_host_jid USING BTREE ON muc_room_subscribers(host, jid);
+CREATE UNIQUE INDEX i_muc_room_subscribers_host_room_jid USING BTREE ON muc_room_subscribers(host, room, jid);
+
CREATE TABLE irc_custom (
jid text NOT NULL,
host text NOT NULL,