aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/mysql.sql6
-rw-r--r--sql/pg.sql6
2 files changed, 12 insertions, 0 deletions
diff --git a/sql/mysql.sql b/sql/mysql.sql
index 64f54ba70..9596afa7c 100644
--- a/sql/mysql.sql
+++ b/sql/mysql.sql
@@ -22,6 +22,10 @@ CREATE TABLE users (
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB CHARACTER SET utf8;
+-- To support SCRAM auth:
+-- ALTER TABLE users ADD COLUMN serverkey text NOT NULL DEFAULT '';
+-- ALTER TABLE users ADD COLUMN salt text NOT NULL DEFAULT '';
+-- ALTER TABLE users ADD COLUMN iterationcount integer NOT NULL DEFAULT 0;
CREATE TABLE last (
username varchar(250) PRIMARY KEY,
@@ -79,6 +83,7 @@ CREATE TABLE spool (
) ENGINE=InnoDB CHARACTER SET utf8;
CREATE INDEX i_despool USING BTREE ON spool(username);
+CREATE INDEX i_spool_created_at USING BTREE ON spool(created_at);
CREATE TABLE vcard (
username varchar(250) PRIMARY KEY,
@@ -158,6 +163,7 @@ CREATE TABLE privacy_list_data (
match_presence_in boolean NOT NULL,
match_presence_out boolean NOT NULL
) ENGINE=InnoDB CHARACTER SET utf8;
+
CREATE INDEX i_privacy_list_data_id ON privacy_list_data(id);
CREATE TABLE private_storage (
diff --git a/sql/pg.sql b/sql/pg.sql
index f07712332..8412c3c6b 100644
--- a/sql/pg.sql
+++ b/sql/pg.sql
@@ -22,6 +22,10 @@ CREATE TABLE users (
created_at TIMESTAMP NOT NULL DEFAULT now()
);
+-- To support SCRAM auth:
+-- ALTER TABLE users ADD COLUMN serverkey text NOT NULL DEFAULT '';
+-- ALTER TABLE users ADD COLUMN salt text NOT NULL DEFAULT '';
+-- ALTER TABLE users ADD COLUMN iterationcount integer NOT NULL DEFAULT 0;
CREATE TABLE last (
username text PRIMARY KEY,
@@ -161,6 +165,8 @@ CREATE TABLE privacy_list_data (
match_presence_out boolean NOT NULL
);
+CREATE INDEX i_privacy_list_data_id ON privacy_list_data USING btree (id);
+
CREATE TABLE private_storage (
username text NOT NULL,
namespace text NOT NULL,