Mercurial > gemma
changeset 5311:72d3b8321ed0 zpg-exception
Fixed broken migration which erased the style of the modified GeoServer view.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 02 Jun 2021 16:55:00 +0200 |
parents | 660147046ddd |
children | 11e013b8b1a9 |
files | schema/updates/1441/01.extend_sounding_result_view.sql |
diffstat | 1 files changed, 10 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/schema/updates/1441/01.extend_sounding_result_view.sql Tue Jun 01 09:33:03 2021 +0200 +++ b/schema/updates/1441/01.extend_sounding_result_view.sql Wed Jun 02 16:55:00 2021 +0200 @@ -1,19 +1,11 @@ --- Could have used an UPDATE for this but this way its more C&P from --- default_sysconfig.sql - -DELETE FROM sys_admin.published_services +UPDATE sys_admin.published_services SET view_def = $$ + SELECT bottleneck_id, + to_char(date_info, 'YYYY-MM-DD') AS date_info, + height, + areas, + surtyp, + zpg_exception + FROM waterway.sounding_results_iso_areas ia + JOIN waterway.sounding_results sr ON sr.id = ia.sounding_result_id +$$ WHERE schema = 'waterway' AND name = 'sounding_results_areas_geoserver'; - -INSERT INTO sys_admin.published_services ( - schema, name, srid, key_column, view_def -) VALUES - ('waterway', 'sounding_results_areas_geoserver', 4326, NULL, $$ - SELECT bottleneck_id, - to_char(date_info, 'YYYY-MM-DD') AS date_info, - height, - areas, - surtyp, - zpg_exception - FROM waterway.sounding_results_iso_areas ia - JOIN waterway.sounding_results sr ON sr.id = ia.sounding_result_id - $$);