diff options
| author | sostler <sbostler@gmail.com> | 2010-04-11 16:50:40 -0400 |
|---|---|---|
| committer | sostler <sbostler@gmail.com> | 2010-04-11 16:50:40 -0400 |
| commit | 57c3298cbb88181ab2a9e2dd5309b7a5df6eb30f (patch) | |
| tree | e9ca474c5a1fa584728b152bf95ac5471943253c /db/0-create.psql | |
| parent | 57be29ee7b7782830cf981d9437b18c88620f8ed (diff) | |
Initial muting implementation
Diffstat (limited to 'db/0-create.psql')
| -rw-r--r-- | db/0-create.psql | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/db/0-create.psql b/db/0-create.psql index e0c5443..10c57a2 100644 --- a/db/0-create.psql +++ b/db/0-create.psql @@ -55,6 +55,18 @@ 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_lowercase_idx ON tags (lower(tag)); +CREATE TABLE mutes ( + user_id integer NOT NULL REFERENCES users, + admin_id integer NOT NULL REFERENCES users, + set_on timestamp NOT NULL DEFAULT now(), + duration interval NOT NULL, + reason text NOT NULL, + is_canceled bool NOT NULL DEFAULT false, + cancel_admin_id integer REFERENCES users +); + +CREATE INDEX mutes_expires_idx ON mutes ((set_on + duration)); + INSERT INTO rooms (key, name, description, admin_only) VALUES ('dumpfm', 'Room A', 'Hangout', false); INSERT INTO rooms (key, name, description, admin_only) |
