view schema/updates/1310/01.import-changed.sql @ 5247:d89f5d75223e new-fwa

Deactivate interpolation stop for gaps longer than 1.5 hours.
author Sascha L. Teichmann <teichmann@intevation.de>
date Tue, 12 May 2020 22:24:16 +0200
parents 47922c1a088d
children
line wrap: on
line source

ALTER TABLE import.imports ADD COLUMN changed timestamp WITH time zone NOT NULL DEFAULT CURRENT_TIMESTAMP;

UPDATE import.imports imp SET
  changed = (SELECT coalesce(max(time), imp.changed)
             FROM import.import_logs
             WHERE import_id = imp.id);