diff 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
line wrap: on
line diff
--- a/schema/gemma.sql	Fri Oct 18 15:17:31 2019 +0200
+++ b/schema/gemma.sql	Fri Oct 18 15:34:34 2019 +0200
@@ -864,6 +864,7 @@
         state      import_state NOT NULL DEFAULT 'queued',
         kind       varchar   NOT NULL,
         enqueued   timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
+        changed    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