summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/0-create.psql2
1 files changed, 2 insertions, 0 deletions
diff --git a/db/0-create.psql b/db/0-create.psql
index cad20e9..2771676 100644
--- a/db/0-create.psql
+++ b/db/0-create.psql
@@ -12,6 +12,7 @@ CREATE TABLE users (
bio text NOT NULL DEFAULT '',
profile_bg text
);
+CREATE INDEX users_nick_idx ON users (lower(nick));
CREATE TABLE rooms (
room_id SERIAL PRIMARY KEY,
@@ -64,6 +65,7 @@ CREATE TABLE tags (
);
CREATE INDEX tags_user_id_idx ON tags (user_id);
CREATE INDEX tags_message_id_idx ON tags (message_id);
+CREATE INDEX tags_created_on_id_idx ON tags (created_on DESC);
CREATE INDEX tags_tag_idx ON tags (lower(tag));
INSERT INTO rooms (key, name, description, admin_only)