summaryrefslogtreecommitdiff
path: root/db/0-create.psql
diff options
context:
space:
mode:
Diffstat (limited to 'db/0-create.psql')
-rw-r--r--db/0-create.psql13
1 files changed, 13 insertions, 0 deletions
diff --git a/db/0-create.psql b/db/0-create.psql
index 979363d..a90d23e 100644
--- a/db/0-create.psql
+++ b/db/0-create.psql
@@ -10,6 +10,7 @@ CREATE TABLE users (
avatar text NOT NULL DEFAULT '',
contact text NOT NULL DEFAULT '',
bio text NOT NULL DEFAULT '',
+ is_bot NOT NULL DEFAULT false,
profile_bg text
);
CREATE INDEX users_nick_lowercase_idx ON users (lower(nick));
@@ -74,3 +75,15 @@ INSERT INTO rooms (key, name, description, admin_only)
INSERT INTO rooms (key, name, description, admin_only)
VALUES ('VIP', 'The VIP Room', 'Command Post', true);
+CREATE TABLE feed_images (
+ external_url text NOT NULL,
+ local_url text NOT NULL,
+ feed_url text NOT NULL,
+ added_on timestamp NOT NULL DEFAULT now(),
+ room_id integer REFERENCES rooms
+);
+
+CREATE INDEX feed_images_external_url_idx ON feed_images (external_url);
+CREATE INDEX feed_images_image_posted_idx ON feed_images (external_url, room_id);
+
+