diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2015-06-22 16:56:08 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2015-06-22 16:56:08 +0300 |
commit | 83cce468a573d3ca58a0c6653a2ccc17c7b4dbc3 (patch) | |
tree | 0e8bffc0327e389ab9eda4b944d85b35fd1e90eb /sql/mysql.sql | |
parent | Document a few more supported protocols (diff) |
Add MAM (XEP-0313) support
Diffstat (limited to '')
-rw-r--r-- | sql/mysql.sql | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sql/mysql.sql b/sql/mysql.sql index 9596afa7c..fab76b9a2 100644 --- a/sql/mysql.sql +++ b/sql/mysql.sql @@ -85,6 +85,31 @@ CREATE TABLE spool ( CREATE INDEX i_despool USING BTREE ON spool(username); CREATE INDEX i_spool_created_at USING BTREE ON spool(created_at); +CREATE TABLE archive ( + username varchar(250) NOT NULL, + timestamp BIGINT UNSIGNED NOT NULL, + peer varchar(250) NOT NULL, + bare_peer varchar(250) NOT NULL, + xml text NOT NULL, + txt text, + id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE, + created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP +) ENGINE=InnoDB CHARACTER SET utf8; + +CREATE FULLTEXT INDEX i_text ON archive(txt); +CREATE INDEX i_username USING BTREE ON archive(username); +CREATE INDEX i_timestamp USING BTREE ON archive(timestamp); +CREATE INDEX i_peer USING BTREE ON archive(peer); +CREATE INDEX i_bare_peer USING BTREE ON archive(bare_peer); + +CREATE TABLE archive_prefs ( + username varchar(250) NOT NULL PRIMARY KEY, + def text NOT NULL, + always text NOT NULL, + never text NOT NULL, + created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP +) ENGINE=InnoDB CHARACTER SET utf8; + CREATE TABLE vcard ( username varchar(250) PRIMARY KEY, vcard mediumtext NOT NULL, |