diff schema/updates/1311/01.improve_section_uniqueness.sql @ 4749:fd9f171b87e4

Generally disallow the same section name for different countries This avoids the situation that a waterway admin is informed about the duplicate name only on trying to accept the import of a new section. Such an import will now end up failed.
author Tom Gottfried <tom@intevation.de>
date Fri, 18 Oct 2019 15:45:48 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/schema/updates/1311/01.improve_section_uniqueness.sql	Fri Oct 18 15:45:48 2019 +0200
@@ -0,0 +1,2 @@
+ALTER TABLE waterway.sections
+    ADD EXCLUDE USING GiST (name WITH =, country WITH <>)