we have to do this because discord doesn't notify us when a timeout ends naturally, only when a moderator removes it early.
9 lines
280 B
SQL
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);
|