diff options
author | Cara Salter <cara@devcara.com> | 2022-05-03 13:57:09 -0400 |
---|---|---|
committer | Cara Salter <cara@devcara.com> | 2022-05-03 13:57:09 -0400 |
commit | 5999e6a803a7b848acf054918fec9ee5024d5697 (patch) | |
tree | eae1f3986c41f7d7c1a956e4606a8120c6032e05 /migrations | |
parent | 8f4277c55a2079edf1c9a69383c353e1cb9ef55c (diff) | |
download | glitch-ng-5999e6a803a7b848acf054918fec9ee5024d5697.tar.gz glitch-ng-5999e6a803a7b848acf054918fec9ee5024d5697.zip |
filter: Initial message filter implementation
Also a custom error type, tracing_subscriber, and unsafe impls
Diffstat (limited to 'migrations')
-rw-r--r-- | migrations/20220429210913_message_filter.sql | 8 | ||||
-rw-r--r-- | migrations/20220429214038_guild_ids_filters.sql | 2 |
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; |