diff options
Diffstat (limited to 'db/0-create.psql')
| -rw-r--r-- | db/0-create.psql | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/db/0-create.psql b/db/0-create.psql index 68f9bfd..1162f86 100644 --- a/db/0-create.psql +++ b/db/0-create.psql @@ -35,7 +35,6 @@ CREATE TABLE rooms ( max_image_height integer NOT NULL DEFAULT 2000 ); - -- ALTER TABLE rooms ADD COLUMN history_size integer NOT NULL DEFAULT 25; -- ALTER TABLE rooms ADD COLUMN max_file_size integer NOT NULL DEFAULT 1048576; -- ALTER TABLE rooms ADD COLUMN max_image_width integer NOT NULL DEFAULT 2000; @@ -58,6 +57,13 @@ CREATE INDEX messages_user_created_on_image_only_idx ON messages (user_id, creat -- historical image dumps in a room. needs to handle non-image messages. CREATE INDEX messages_room_id_created_on_idx ON messages (room_id, created_on); + +CREATE TABLE image_urls ( + url text, + last_posted timestamp NOT NULL DEFAULT now(), + PRIMARY KEY(url) +); + -- Queries to support: -- 1) What messages are tagged x? (ordered by time, popularity) -- 2) What did I tag x? |
