view schema/updates/1310/01.import-changed.sql @ 4945:97533bbfaa2d fairway-marks-import

Add missing fairway mark types to layer group
author Tom Gottfried <tom@intevation.de>
date Tue, 18 Feb 2020 13:00:25 +0100
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);