Mercurial > gemma
changeset 4098:cfa0a5775d70 timezone
Reapplied timezone patch to database schema.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 26 Jul 2019 09:57:29 +0200 |
parents | 472aedc8927d |
children | cc3d607b49cc |
files | schema/gemma.sql schema/updates/1010/01.timezones-imports.sql schema/version.sql |
diffstat | 3 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/schema/gemma.sql Fri Jul 26 09:54:08 2019 +0200 +++ b/schema/gemma.sql Fri Jul 26 09:57:29 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 zone NOT NULL DEFAULT now(), + time timestamp with time zone NOT NULL DEFAULT now(), kind log_type NOT NULL DEFAULT 'info', msg TEXT NOT NULL )
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/updates/1010/01.timezones-imports.sql Fri Jul 26 09:57:29 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;