view schema/updates/1310/01.import-changed.sql @ 5317:dcb22351e058

Added configuration files for JS tooling For further information you may read https://vuejs.github.io/vetur/guide/setup.html#extensions
author Thomas Junk <thomas.junk@intevation.de>
date Fri, 18 Jun 2021 11:58:43 +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);