summaryrefslogtreecommitdiff
path: root/sql/lite.sql
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/lite.sql
parentDocument a few more supported protocols (diff)
Add MAM (XEP-0313) support
Diffstat (limited to 'sql/lite.sql')
-rw-r--r--sql/lite.sql24
1 files changed, 24 insertions, 0 deletions
diff --git a/sql/lite.sql b/sql/lite.sql
index 21e4df92..461686d1 100644
--- a/sql/lite.sql
+++ b/sql/lite.sql
@@ -270,3 +270,27 @@ CREATE TABLE caps_features (
);
CREATE INDEX i_caps_features_node_subnode ON caps_features (node, subnode);
+
+CREATE TABLE archive (
+ username text NOT NULL,
+ timestamp BIGINT UNSIGNED NOT NULL,
+ peer text NOT NULL,
+ bare_peer text NOT NULL,
+ xml text NOT NULL,
+ txt text,
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
+);
+
+CREATE INDEX i_username ON archive(username);
+CREATE INDEX i_timestamp ON archive(timestamp);
+CREATE INDEX i_peer ON archive(peer);
+CREATE INDEX i_bare_peer ON archive(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 CURRENT_TIMESTAMP
+);