view schema/updates/1310/01.import-changed.sql @ 5279:a17c2a0b8e44

client: use current time in the review layer request * avoid using value from time slider in the request for review layer
author Fadi Abbud <fadi.abbud@intevation.de>
date Thu, 11 Jun 2020 15:50:11 +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);