aboutsummaryrefslogtreecommitdiff
path: root/sql/lite.new.sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql/lite.new.sql')
-rw-r--r--sql/lite.new.sql54
1 files changed, 54 insertions, 0 deletions
diff --git a/sql/lite.new.sql b/sql/lite.new.sql
index de62cd169..6ec7ea876 100644
--- a/sql/lite.new.sql
+++ b/sql/lite.new.sql
@@ -410,3 +410,57 @@ CREATE TABLE push_session (
);
CREATE UNIQUE INDEX i_push_session_susn ON push_session (server_host, username, service, node);
+
+CREATE TABLE mix_channel (
+ channel text NOT NULL,
+ service text NOT NULL,
+ username text NOT NULL,
+ domain text NOT NULL,
+ jid text NOT NULL,
+ hidden boolean NOT NULL,
+ hmac_key text NOT NULL,
+ created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
+);
+
+CREATE UNIQUE INDEX i_mix_channel ON mix_channel (channel, service);
+CREATE INDEX i_mix_channel_serv ON mix_channel (service);
+
+CREATE TABLE mix_participant (
+ channel text NOT NULL,
+ service text NOT NULL,
+ username text NOT NULL,
+ domain text NOT NULL,
+ jid text NOT NULL,
+ id text NOT NULL,
+ nick text NOT NULL,
+ created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
+);
+
+CREATE UNIQUE INDEX i_mix_participant ON mix_participant (channel, service, username, domain);
+CREATE INDEX i_mix_participant_chan_serv ON mix_participant (channel, service);
+
+CREATE TABLE mix_subscription (
+ channel text NOT NULL,
+ service text NOT NULL,
+ username text NOT NULL,
+ domain text NOT NULL,
+ node text NOT NULL,
+ jid text NOT NULL
+);
+
+CREATE UNIQUE INDEX i_mix_subscription ON mix_subscription (channel, service, username, domain, node);
+CREATE INDEX i_mix_subscription_chan_serv_ud ON mix_subscription (channel, service, username, domain);
+CREATE INDEX i_mix_subscription_chan_serv_node ON mix_subscription (channel, service, node);
+CREATE INDEX i_mix_subscription_chan_serv ON mix_subscription (channel, service);
+
+CREATE TABLE mix_pam (
+ username text NOT NULL,
+ server_host text NOT NULL,
+ channel text NOT NULL,
+ service text NOT NULL,
+ id text NOT NULL,
+ created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
+);
+
+CREATE UNIQUE INDEX i_mix_pam ON mix_pam (username, server_host, channel, service);
+CREATE INDEX i_mix_pam_us ON mix_pam (username, server_host);