Mercurial > gemma
comparison schema/gemma.sql @ 4895:9f799077a3e6 fairway-marks-import
Prevent importing non-distinct fairway marks
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Tue, 14 Jan 2020 18:24:51 +0100 |
parents | 8eb36d0d5bdf |
children | dd888bbb7e43 |
comparison
equal
deleted
inserted
replaced
4894:8eb36d0d5bdf | 4895:9f799077a3e6 |
---|---|
862 condtn int, | 862 condtn int, |
863 bcnshp int, | 863 bcnshp int, |
864 catlam int, | 864 catlam int, |
865 dirimp smallint REFERENCES dirimps | 865 dirimp smallint REFERENCES dirimps |
866 ) | 866 ) |
867 -- Prevent identical entries using composite type comparison | |
868 -- (i.e. considering two NULL values in a field equal): | |
869 CREATE UNIQUE INDEX fairway_marks_distinct_rows ON fairway_marks | |
870 ((CAST((0, geom, | |
871 datsta, datend, persta, perend, objnam, nobjnm, inform, ninfom, | |
872 scamin, picrep, txtdsc, sordat, sorind, colour, colpat, condtn, | |
873 bcnshp, catlam, dirimp) AS fairway_marks) | |
874 )) | |
867 ; | 875 ; |
868 | 876 |
869 | 877 |
870 -- | 878 -- |
871 -- Import queue and respective logging | 879 -- Import queue and respective logging |