Catalogger.NET/Catalogger.Backend/Database/Migrations/003_store_timeouts.up.sql
sam e6d68338db
feat: store timeouts in database and log them ending
we have to do this because discord doesn't notify us when a timeout
ends naturally, only when a moderator removes it early.
2024-11-05 22:22:12 +01:00

9 lines
280 B
SQL

create table timeouts (
id integer generated by default as identity primary key,
user_id bigint not null,
guild_id bigint not null,
moderator_id bigint,
until timestamptz not null
);
create unique index ix_timeouts_user_guild on timeouts (user_id, guild_id);