From b2e6d3f5530cea8458374957e224a49d178e0ae9 Mon Sep 17 00:00:00 2001 From: BAaboe Date: Tue, 22 Jul 2025 21:58:14 +0200 Subject: [PATCH] feat: added ban table to the database --- migrations/2025-07-22-195121_add_ban/down.sql | 2 ++ migrations/2025-07-22-195121_add_ban/up.sql | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 migrations/2025-07-22-195121_add_ban/down.sql create mode 100644 migrations/2025-07-22-195121_add_ban/up.sql 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) +);