Mercurial > gemma
diff schema/gemma.sql @ 4912:bfd8ef836998 fairway-marks-import
Fix handling of attribute dirimp
It's defined as a comma separated list of integers in the IENC
feature catalogue.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Mon, 10 Feb 2020 18:11:52 +0100 |
parents | 6f244b5eb716 |
children | 8c1a3d5e3962 |
line wrap: on
line diff
--- a/schema/gemma.sql Mon Feb 10 18:02:22 2020 +0100 +++ b/schema/gemma.sql Mon Feb 10 18:11:52 2020 +0100 @@ -867,8 +867,7 @@ colpat varchar, condtn int, bcnshp int, - catlam int, - dirimp smallint REFERENCES dirimps + catlam int ) INHERITS (fairway_marks) -- Prevent identical entries using composite type comparison -- (i.e. considering two NULL values in a field equal): @@ -877,9 +876,15 @@ ((CAST((geom, datsta, datend, persta, perend, objnam, nobjnm, inform, ninfom, scamin, picrep, txtdsc, sordat, sorind, - 0, colour, colpat, condtn, bcnshp, catlam, dirimp + 0, colour, colpat, condtn, bcnshp, catlam ) AS fairway_marks_bcnlat) )) + + CREATE TABLE fairway_marks_bcnlat_dirimps ( + fm_bcnlat_id int REFERENCES fairway_marks_bcnlat, + dirimp smallint REFERENCES dirimps, + PRIMARY KEY (fm_bcnlat_id, dirimp) + ) ;