diff schema/gemma.sql @ 4894:8eb36d0d5bdf fairway-marks-import

Draft implementation of fairway marks import Currently works (at least) for IENC feature BCNLAT. In order to be able to store different types of fairway marks, more tables and import types are needed. Currently stupidly stores every entry received from the data source. Sorting out duplicates and invalidating entries removed from the data source needs to implemented.
author Tom Gottfried <tom@intevation.de>
date Tue, 14 Jan 2020 15:01:42 +0100
parents 082027fb2d58
children 9f799077a3e6
line wrap: on
line diff
--- a/schema/gemma.sql	Thu Jan 09 17:23:54 2020 +0100
+++ b/schema/gemma.sql	Tue Jan 14 15:01:42 2020 +0100
@@ -840,6 +840,30 @@
         CHECK(measure_type = 'minimum guaranteed'
             OR value_lifetime IS NOT NULL)
     )
+
+    CREATE TABLE fairway_marks (
+        id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
+        geom geography(POINT, 4326) NOT NULL,
+        datsta varchar,
+        datend varchar,
+        persta varchar,
+        perend varchar,
+        objnam varchar,
+        nobjnm varchar,
+        inform varchar,
+        ninfom varchar,
+        scamin int,
+        picrep varchar,
+        txtdsc varchar,
+        sordat varchar,
+        sorind varchar,
+        colour varchar,
+        colpat varchar,
+        condtn int,
+        bcnshp int,
+        catlam int,
+        dirimp smallint REFERENCES dirimps
+    )
 ;