Mercurial > gemma
changeset 4050:02d5c2e17eb8 historization_ng
Adapted surveys back end to new historization model.
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Wed, 24 Jul 2019 17:11:23 +0200 |
parents | 9072584b205f |
children | 0b65915757c8 |
files | pkg/controllers/surveys.go |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/pkg/controllers/surveys.go Wed Jul 24 16:46:54 2019 +0200 +++ b/pkg/controllers/surveys.go Wed Jul 24 17:11:23 2019 +0200 @@ -32,9 +32,9 @@ g.objname AS gauge_objname, r.value AS waterlevel_value FROM waterway.bottlenecks AS b + JOIN waterway.sounding_results AS s ON b.bottleneck_id = s.bottleneck_id JOIN waterway.gauges AS g - ON b.gauge_location = g.location AND b.gauge_validity = g.validity - JOIN waterway.sounding_results AS s ON b.bottleneck_id = s.bottleneck_id + ON b.gauge_location = g.location AND s.date_info::timestamptz <@ g.validity LEFT JOIN waterway.gauges_reference_water_levels AS r ON s.depth_reference = r.depth_reference AND g.location = r.location AND g.validity = r.validity