learn-request-queue/db/upgrade/v0.2-v0.3.sql

19 lines
500 B
MySQL
Raw Permalink Normal View History

2020-11-29 20:31:03 +00:00
BEGIN;
UPDATE version SET minor = 3;
CREATE TABLE cron (
jobName varchar UNIQUE NOT NULL, -- Application-recognizable name for the job
runinterval interval NOT NULL, -- Duration between runs
-- Last successful run - only gets updated if run is successful
lastSuccess timestamptz DEFAULT to_timestamp(0), -- Defaults to beginning of time
PRIMARY KEY(jobName)
);
INSERT INTO cron (jobName,runInterval) VALUES
('processBans','30 minutes'),
('processEmptyMetadata','1 day');
COMMIT;