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:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2015-06-22 16:56:08 +0300
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2015-06-22 16:56:08 +0300
commit83cce468a573d3ca58a0c6653a2ccc17c7b4dbc3 (patch)
tree0e8bffc0327e389ab9eda4b944d85b35fd1e90eb /sql/pg.sql
parent66310788848ef185f3831648b2abf67ab6ded7fa (diff)
Add MAM (XEP-0313) support
Diffstat (limited to 'sql/pg.sql')
-rw-r--r--sql/pg.sql29
1 files changed, 26 insertions, 3 deletions
diff --git a/sql/pg.sql b/sql/pg.sql
index 736c4f932..2a052d337 100644
--- a/sql/pg.sql
+++ b/sql/pg.sql
@@ -85,6 +85,29 @@ CREATE TABLE spool (
CREATE INDEX i_despool ON spool USING btree (username);
+CREATE TABLE archive (
+ username text NOT NULL,
+ timestamp BIGINT NOT NULL,
+ peer text NOT NULL,
+ bare_peer text NOT NULL,
+ xml text NOT NULL,
+ txt text,
+ id SERIAL,
+ created_at TIMESTAMP NOT NULL DEFAULT now()
+);
+
+CREATE INDEX i_username ON archive USING btree (username);
+CREATE INDEX i_timestamp ON archive USING btree (timestamp);
+CREATE INDEX i_peer ON archive USING btree (peer);
+CREATE INDEX i_bare_peer ON archive USING btree (bare_peer);
+
+CREATE TABLE archive_prefs (
+ username text NOT NULL PRIMARY KEY,
+ def text NOT NULL,
+ always text NOT NULL,
+ never text NOT NULL,
+ created_at TIMESTAMP NOT NULL DEFAULT now()
+);
CREATE TABLE vcard (
username text PRIMARY KEY,
@@ -299,6 +322,6 @@ CREATE TABLE sm (
info text NOT NULL
);
-CREATE UNIQUE INDEX i_sid ON sm USING btree (usec, pid);
-CREATE INDEX i_node ON sm USING btree (node);
-CREATE INDEX i_username ON sm USING btree (username);
+CREATE UNIQUE INDEX i_sm_sid ON sm USING btree (usec, pid);
+CREATE INDEX i_sm_node ON sm USING btree (node);
+CREATE INDEX i_sm_username ON sm USING btree (username);