Mercurial > gemma
comparison pkg/imports/wg.go @ 4028:5fed2f5bc104 historization_ng
End validity of gauge if it gets deleted during import.
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Wed, 17 Jul 2019 17:52:04 +0200 |
parents | 29ef6d41e4af |
children | 4332b9e26e2f |
comparison
equal
deleted
inserted
replaced
3997:78c9aef329cd | 4028:5fed2f5bc104 |
---|---|
64 // CleanUp does nothing as there is nothing to cleanup with gauges. | 64 // CleanUp does nothing as there is nothing to cleanup with gauges. |
65 func (*WaterwayGauge) CleanUp() error { return nil } | 65 func (*WaterwayGauge) CleanUp() error { return nil } |
66 | 66 |
67 const ( | 67 const ( |
68 eraseObsoleteGaugesSQL = ` | 68 eraseObsoleteGaugesSQL = ` |
69 UPDATE waterway.gauges SET erased = true | 69 UPDATE waterway.gauges SET erased = true, validity = validity - '[now,)' |
70 WHERE NOT erased | 70 WHERE NOT erased |
71 AND (location).country_code = ANY($1) | 71 AND (location).country_code = ANY($1) |
72 AND isrs_astext(location) <> ALL($2) | 72 AND isrs_astext(location) <> ALL($2) |
73 RETURNING isrs_astext(location) | 73 RETURNING isrs_astext(location) |
74 ` | 74 ` |