# HG changeset patch # User Sascha L. Teichmann # Date 1564065907 -7200 # Node ID 419f28898db0c7340054b1af5620a0b3078991c2 # Parent 7fb75deff16b7af16779f986c648b339639e96fe Added time zones to import queue tables. diff -r 7fb75deff16b -r 419f28898db0 schema/gemma.sql --- a/schema/gemma.sql Thu Jul 25 16:26:01 2019 +0200 +++ b/schema/gemma.sql Thu Jul 25 16:45:07 2019 +0200 @@ -826,8 +826,8 @@ id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, state import_state NOT NULL DEFAULT 'queued', kind varchar NOT NULL, - enqueued timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - due timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + enqueued timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, + due timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, retry_wait interval CHECK(retry_wait IS NULL OR retry_wait >= interval '0 microseconds'), @@ -850,7 +850,7 @@ CREATE TABLE import_logs ( import_id int NOT NULL REFERENCES imports(id) ON DELETE CASCADE, - time timestamp NOT NULL DEFAULT now(), + time timestamp with time zone NOT NULL DEFAULT now(), kind log_type NOT NULL DEFAULT 'info', msg TEXT NOT NULL ) diff -r 7fb75deff16b -r 419f28898db0 schema/updates/1010/01.timezones-imports.sql --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/updates/1010/01.timezones-imports.sql Thu Jul 25 16:45:07 2019 +0200 @@ -0,0 +1,3 @@ +ALTER TABLE import.imports ALTER COLUMN enqueued TYPE timestamp with time zone; +ALTER TABLE import.imports ALTER COLUMN due TYPE timestamp with time zone; +ALTER TABLE import.import_logs ALTER COLUMN time TYPE timestamp with time zone; diff -r 7fb75deff16b -r 419f28898db0 schema/version.sql --- a/schema/version.sql Thu Jul 25 16:26:01 2019 +0200 +++ b/schema/version.sql Thu Jul 25 16:45:07 2019 +0200 @@ -1,1 +1,1 @@ -INSERT INTO gemma_schema_version(version) VALUES (1009); +INSERT INTO gemma_schema_version(version) VALUES (1010);