changeset 4925:b86ce7fc4da3 fairway-marks-import

Add missing BOYCAR attribute
author Tom Gottfried <tom@intevation.de>
date Fri, 14 Feb 2020 13:01:45 +0100
parents 565da29060e7
children 271616eff8e3
files pkg/imports/fm_boycar.go schema/gemma.sql
diffstat 2 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/imports/fm_boycar.go	Fri Feb 14 12:34:02 2020 +0100
+++ b/pkg/imports/fm_boycar.go	Fri Feb 14 13:01:45 2020 +0100
@@ -70,6 +70,7 @@
 	Conrad *int    `json:"hydro_conrad"`
 	Marsys *int    `json:"hydro_marsys"`
 	Boyshp *int    `json:"hydro_boyshp"`
+	Catcam *int    `json:"hydro_catcam"`
 }
 
 type boycarFeaturetype struct {
@@ -101,10 +102,11 @@
   colpat,
   conrad,
   marsys,
-  boyshp
+  boyshp,
+  catcam
 )
 SELECT newfm, $3, $4, $5, $6, $7, $8, $9,
-    $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20
+    $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21
   FROM ST_Transform(ST_GeomFromWKB($1, $2::integer), 4326) AS newfm (newfm)
   WHERE pg_has_role('sys_admin', 'MEMBER')
     OR ST_Intersects((select a from a),
@@ -113,7 +115,7 @@
   CAST((geom,
       datsta, datend, persta, perend, objnam, nobjnm, inform, ninfom,
       scamin, picrep, txtdsc, sordat, sorind,
-      0, colour, colpat, conrad, marsys, boyshp
+      0, colour, colpat, conrad, marsys, boyshp, catcam
     ) AS waterway.fairway_marks_boycar)
   )
   DO NOTHING
@@ -191,6 +193,7 @@
 				f.props.Conrad,
 				f.props.Marsys,
 				f.props.Boyshp,
+				f.props.Catcam,
 			).Scan(&fmid)
 			return err
 		})
--- a/schema/gemma.sql	Fri Feb 14 12:34:02 2020 +0100
+++ b/schema/gemma.sql	Fri Feb 14 13:01:45 2020 +0100
@@ -893,7 +893,8 @@
         colpat varchar,
         conrad int,
         marsys int,
-        boyshp int
+        boyshp int,
+        catcam int
     ) INHERITS (fairway_marks)
     -- Prevent identical entries using composite type comparison
     -- (i.e. considering two NULL values in a field equal):
@@ -902,7 +903,7 @@
         ((CAST((geom,
                 datsta, datend, persta, perend, objnam, nobjnm, inform, ninfom,
                 scamin, picrep, txtdsc, sordat, sorind,
-                0, colour, colpat, conrad, marsys, boyshp
+                0, colour, colpat, conrad, marsys, boyshp, catcam
             ) AS fairway_marks_boycar)
         ))