aboutsummaryrefslogtreecommitdiff
path: root/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'migrations')
-rw-r--r--migrations/20220429210913_message_filter.sql8
-rw-r--r--migrations/20220429214038_guild_ids_filters.sql2
2 files changed, 10 insertions, 0 deletions
diff --git a/migrations/20220429210913_message_filter.sql b/migrations/20220429210913_message_filter.sql
new file mode 100644
index 0000000..95b7844
--- /dev/null
+++ b/migrations/20220429210913_message_filter.sql
@@ -0,0 +1,8 @@
+-- Add migration script here
+
+CREATE TYPE filter_action AS ENUM ( 'delete', 'review' );
+CREATE TABLE message_filter(
+ id SERIAL PRIMARY KEY,
+ pattern TEXT NOT NULL,
+ action filter_action NOT NULL DEFAULT 'review'
+);
diff --git a/migrations/20220429214038_guild_ids_filters.sql b/migrations/20220429214038_guild_ids_filters.sql
new file mode 100644
index 0000000..302b809
--- /dev/null
+++ b/migrations/20220429214038_guild_ids_filters.sql
@@ -0,0 +1,2 @@
+-- Add migration script here
+ALTER TABLE message_filter ADD COLUMN guild_id TEXT NOT NULL;