backend/migrations/2025-07-22-195121_add_ban/up.sql
BAaboe c2b5f6568f
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
ci/woodpecker/pr/build-and-publish Pipeline was successful
style: renaming parameter, ban_time -> banned_since
2025-07-24 01:58:10 +02:00

8 lines
291 B
SQL

-- Your SQL goes here
CREATE TABLE guild_bans (
guild_uuid uuid NOT NULL REFERENCES guilds(uuid) ON DELETE CASCADE,
user_uuid uuid NOT NULL REFERENCES users(uuid),
reason VARCHAR(200) DEFAULT NULL,
banned_since TIMESTAMPTZ NOT NULL DEFAULT NOW(),
PRIMARY KEY (user_uuid, guild_uuid)
);