From f69e3a821c61ee49da06ae7d10502aa331f06123 Mon Sep 17 00:00:00 2001 From: Dessa Simpson Date: Sun, 29 Nov 2020 13:31:03 -0700 Subject: [PATCH] Add v0.2-v0.3 db upgrade script --- db/upgrade/v0.2-v0.3.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 db/upgrade/v0.2-v0.3.sql diff --git a/db/upgrade/v0.2-v0.3.sql b/db/upgrade/v0.2-v0.3.sql new file mode 100644 index 0000000..defe309 --- /dev/null +++ b/db/upgrade/v0.2-v0.3.sql @@ -0,0 +1,18 @@ +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;