PluralKit/PluralKit.Core/Database/Migrations/11.sql

18 lines
423 B
MySQL
Raw Normal View History

-- SCHEMA VERSION 11: (insert date) --
-- Create command message table --
create table command_message
(
message_id bigint primary key,
author_id bigint not null,
timestamp timestamp not null default now()
);
create function cleanup_command_message() returns void as $$
begin
delete from command_message where timestamp < now() - interval '2 hours';
end;
$$ language plpgsql;
2020-10-18 06:06:20 +00:00
update info set schema_version = 11;