Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Khramtsov <ekhramtsov@process-one.net>2019-02-21 12:36:33 +0300
committerEvgeny Khramtsov <ekhramtsov@process-one.net>2019-02-21 12:36:33 +0300
commit1684436bfe397d6d7e52f6bf88050328ea23649c (patch)
treeefd3720a895155c88dc41e3923afe9f280d5f938 /sql/pg.sql
parent68614f25f8678c128f7695d7fdeae5c330869dbd (diff)
parent33202d59c0cebdb09bbf81e98592a423f4caeef1 (diff)
Merge branch 'mix'
Diffstat (limited to 'sql/pg.sql')
-rw-r--r--sql/pg.sql53
1 files changed, 53 insertions, 0 deletions
diff --git a/sql/pg.sql b/sql/pg.sql
index 4483e7e8e..250a22d2d 100644
--- a/sql/pg.sql
+++ b/sql/pg.sql
@@ -399,3 +399,56 @@ CREATE TABLE push_session (
CREATE UNIQUE INDEX i_push_usn ON push_session USING btree (username, service, node);
CREATE UNIQUE INDEX i_push_ut ON push_session USING btree (username, timestamp);
+
+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,
+ 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, channel, service);
+CREATE INDEX i_mix_pam_us ON mix_pam (username);