elliebot/src/EllieBot/Migrations/PostgreSql/20250317063129_scheduled-commands.sql

23 lines
723 B
SQL

START TRANSACTION;
CREATE TABLE scheduledcommand (
id integer GENERATED BY DEFAULT AS IDENTITY,
userid numeric(20,0) NOT NULL,
channelid numeric(20,0) NOT NULL,
guildid numeric(20,0) NOT NULL,
messageid numeric(20,0) NOT NULL,
text text NOT NULL,
"when" timestamp without time zone NOT NULL,
CONSTRAINT pk_scheduledcommand PRIMARY KEY (id)
);
CREATE INDEX ix_scheduledcommand_guildid ON scheduledcommand (guildid);
CREATE INDEX ix_scheduledcommand_userid ON scheduledcommand (userid);
CREATE INDEX ix_scheduledcommand_when ON scheduledcommand ("when");
INSERT INTO "__EFMigrationsHistory" (migrationid, productversion)
VALUES ('20250317063129_scheduled-commands', '9.0.1');
COMMIT;