diff --git a/migrations/2025-07-22-195121_add_ban/down.sql b/migrations/2025-07-22-195121_add_ban/down.sql new file mode 100644 index 0000000..62fe554 --- /dev/null +++ b/migrations/2025-07-22-195121_add_ban/down.sql @@ -0,0 +1,2 @@ +-- This file should undo anything in `up.sql` +DROP TABLE guild_bans; diff --git a/migrations/2025-07-22-195121_add_ban/up.sql b/migrations/2025-07-22-195121_add_ban/up.sql new file mode 100644 index 0000000..3dd5f9b --- /dev/null +++ b/migrations/2025-07-22-195121_add_ban/up.sql @@ -0,0 +1,7 @@ +-- Your SQL goes here +CREATE TABLE guild_bans ( + guild_ban uuid NOT NULL REFERENCES guilds(uuid) ON DELETE CASCADE, + user_ban uuid NOT NULL REFERENCES users(uuid), + reason VARCHAR(200) DEFAULT NULL, + PRIMARY KEY (user_uuid, guild_uuid) +);