Mercurial > gemma
view schema/updates/1310/01.import-changed.sql @ 5030:737d7859dd86
Store fairway dimensions as MultiPolygon
This avoids storing a single invalid geometry from the data source
as multiple valid geometries with duplicate attribute sets.
The previous behaviour was not correctly handled in import tracking,
because only the ID of the first item in a set of multiple geometries
generated from a single entry from the data source was tracked.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 18 Mar 2020 18:42:30 +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);