From ead23e3d01b765c04f5af9a21a3518fc8c2f660a Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 9 Oct 2019 01:07:55 +0100 Subject: [PATCH] chat_filter_rule table SQL --- houdini.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/houdini.sql b/houdini.sql index 96936e0..0806404 100644 --- a/houdini.sql +++ b/houdini.sql @@ -442,6 +442,20 @@ COMMENT ON COLUMN room_table.id IS 'Table ID'; COMMENT ON COLUMN room_table.room_id IS 'Room ID of table'; COMMENT ON COLUMN room_table.game IS 'Game of table'; +CREATE TABLE chat_filter_rule ( + word TEXT, + filter BOOLEAN NOT NULL DEFAULT FALSE, + warn BOOLEAN NOT NULL DEFAULT FALSE, + ban BOOLEAN NOT NULL DEFAULT FALSE +); + +CREATE UNIQUE INDEX chat_filter_rule_word ON chat_filter_rule(word); + +COMMENT ON COLUMN chat_filter_rule.word IS 'Word to filter'; +COMMENT ON COLUMN chat_filter_rule.filter IS 'Hide word from players'; +COMMENT ON COLUMN chat_filter_rule.warn IS 'Warn player for word'; +COMMENT ON COLUMN chat_filter_rule.ban IS 'Ban player for word'; + DROP TABLE IF EXISTS penguin; CREATE TABLE penguin ( id SERIAL,