changeset 4610:1b928c0a0894 geoserver_sql_views

Adapt demo data to new database model Also add an ON CONFLICT clause to allow resetting entries in a partly populated table.
author Tom Gottfried <tom@intevation.de>
date Thu, 05 Sep 2019 17:41:43 +0200
parents 1bf26d18b4d7
children b5aa1eb83bb0
files schema/demo-data/published_services.sql
diffstat 1 files changed, 15 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/schema/demo-data/published_services.sql	Thu Sep 05 17:27:34 2019 +0200
+++ b/schema/demo-data/published_services.sql	Thu Sep 05 17:41:43 2019 +0200
@@ -11,17 +11,18 @@
 -- Author(s):
 --  * Tom Gottfried <tom@intevation.de>
 
-INSERT INTO sys_admin.published_services (name) VALUES
-    ('waterway.sections_geoserver'),
-    ('waterway.stretches_geoserver'),
-    ('waterway.fairway_dimensions'),
-    ('waterway.gauges_geoserver'),
-    ('waterway.distance_marks_ashore_geoserver'),
-    ('waterway.distance_marks_geoserver'),
-    ('waterway.sounding_results_contour_lines_geoserver'),
-    ('waterway.bottlenecks_geoserver'),
-    ('waterway.bottleneck_overview'),
-    ('waterway.waterway_axis'),
-    ('waterway.waterway_area'),
-    ('waterway.waterway_profiles'),
-    ('waterway.sounding_differences')
+INSERT INTO sys_admin.published_services (schema, name, view_def) VALUES
+    ('waterway', 'sections_geoserver', NULL),
+    ('waterway', 'stretches_geoserver', NULL),
+    ('waterway', 'fairway_dimensions', NULL),
+    ('waterway', 'gauges_geoserver', NULL),
+    ('waterway', 'distance_marks_ashore_geoserver', NULL),
+    ('waterway', 'distance_marks_geoserver', NULL),
+    ('waterway', 'sounding_results_contour_lines_geoserver', NULL),
+    ('waterway', 'bottlenecks_geoserver', NULL),
+    ('waterway', 'bottleneck_overview', NULL),
+    ('waterway', 'waterway_axis', NULL),
+    ('waterway', 'waterway_area', NULL),
+    ('waterway', 'waterway_profiles', NULL),
+    ('waterway', 'sounding_differences', NULL)
+ON CONFLICT DO NOTHING