Mercurial > gemma
comparison 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 |
comparison
equal
deleted
inserted
replaced
4911:bcb8b69e4358 | 4912:bfd8ef836998 |
---|---|
865 id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, | 865 id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, |
866 colour varchar, | 866 colour varchar, |
867 colpat varchar, | 867 colpat varchar, |
868 condtn int, | 868 condtn int, |
869 bcnshp int, | 869 bcnshp int, |
870 catlam int, | 870 catlam int |
871 dirimp smallint REFERENCES dirimps | |
872 ) INHERITS (fairway_marks) | 871 ) INHERITS (fairway_marks) |
873 -- Prevent identical entries using composite type comparison | 872 -- Prevent identical entries using composite type comparison |
874 -- (i.e. considering two NULL values in a field equal): | 873 -- (i.e. considering two NULL values in a field equal): |
875 CREATE UNIQUE INDEX fairway_marks_bcnlat_distinct_rows | 874 CREATE UNIQUE INDEX fairway_marks_bcnlat_distinct_rows |
876 ON fairway_marks_bcnlat | 875 ON fairway_marks_bcnlat |
877 ((CAST((geom, | 876 ((CAST((geom, |
878 datsta, datend, persta, perend, objnam, nobjnm, inform, ninfom, | 877 datsta, datend, persta, perend, objnam, nobjnm, inform, ninfom, |
879 scamin, picrep, txtdsc, sordat, sorind, | 878 scamin, picrep, txtdsc, sordat, sorind, |
880 0, colour, colpat, condtn, bcnshp, catlam, dirimp | 879 0, colour, colpat, condtn, bcnshp, catlam |
881 ) AS fairway_marks_bcnlat) | 880 ) AS fairway_marks_bcnlat) |
882 )) | 881 )) |
882 | |
883 CREATE TABLE fairway_marks_bcnlat_dirimps ( | |
884 fm_bcnlat_id int REFERENCES fairway_marks_bcnlat, | |
885 dirimp smallint REFERENCES dirimps, | |
886 PRIMARY KEY (fm_bcnlat_id, dirimp) | |
887 ) | |
883 ; | 888 ; |
884 | 889 |
885 | 890 |
886 -- | 891 -- |
887 -- Import queue and respective logging | 892 -- Import queue and respective logging |