Mercurial > gemma
comparison schema/gemma.sql @ 4748:47922c1a088d
Added a 'changed' column to the import.imports table.
Changed is update each time the state changes (TODO: solve this with a trigger).
The update script takes as approximation the time of the last log entry
connected with the particular import.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 18 Oct 2019 15:34:34 +0200 |
parents | 2440d2f86f4e |
children | fd9f171b87e4 |
comparison
equal
deleted
inserted
replaced
4747:b1428b44e43f | 4748:47922c1a088d |
---|---|
862 CREATE TABLE imports ( | 862 CREATE TABLE imports ( |
863 id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, | 863 id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, |
864 state import_state NOT NULL DEFAULT 'queued', | 864 state import_state NOT NULL DEFAULT 'queued', |
865 kind varchar NOT NULL, | 865 kind varchar NOT NULL, |
866 enqueued timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, | 866 enqueued timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, |
867 changed timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
867 due timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, | 868 due timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, |
868 retry_wait interval | 869 retry_wait interval |
869 CHECK(retry_wait IS NULL | 870 CHECK(retry_wait IS NULL |
870 OR retry_wait >= interval '0 microseconds'), | 871 OR retry_wait >= interval '0 microseconds'), |
871 trys_left int, -- if NULL and retry_wait NOT NULL, endless | 872 trys_left int, -- if NULL and retry_wait NOT NULL, endless |