From a0ffed43ddabc4f97f1d04e652528556949ba6ef Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Tue, 24 May 2022 09:50:38 -0600 Subject: [PATCH] database/backfill_state: change type of first_expected_ts to BIGINT --- database/upgrades/49-backfill-state-timestamp-bigint.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 database/upgrades/49-backfill-state-timestamp-bigint.sql diff --git a/database/upgrades/49-backfill-state-timestamp-bigint.sql b/database/upgrades/49-backfill-state-timestamp-bigint.sql new file mode 100644 index 0000000..971fce6 --- /dev/null +++ b/database/upgrades/49-backfill-state-timestamp-bigint.sql @@ -0,0 +1,7 @@ +-- v49: Convert first_expected_ts to BIGINT so that we can use zero-values. + +-- only: sqlite +UPDATE backfill_state SET first_expected_ts=unixepoch(first_expected_ts); + +-- only: postgres +ALTER TABLE backfill_state ALTER COLUMN first_expected_ts TYPE BIGINT;