diff backend/doc/schema/postgresql-spatial.sql @ 9717:6824c447f5b0 3.2.x

Ensure pseudo-boolean values in hws_lines.official NULL values lead to a null pointer in HWSFactory and the semantic of the column is clearly boolean. See also rev. aef987124822 for a related fix in the importer.
author Tom Gottfried <tom@intevation.de>
date Mon, 22 Mar 2021 18:14:47 +0100
parents cc53aae06303
children
line wrap: on
line diff
--- a/backend/doc/schema/postgresql-spatial.sql	Mon Mar 22 17:35:30 2021 +0100
+++ b/backend/doc/schema/postgresql-spatial.sql	Mon Mar 22 18:14:47 2021 +0100
@@ -177,7 +177,7 @@
     river_id int REFERENCES rivers(id) ON DELETE CASCADE,
     name VARCHAR(256),
     path VARCHAR(256),
-    official INT DEFAULT 0,
+    official INT DEFAULT 0 NOT NULL CHECK(official IN(0,1)),
     agency VARCHAR(256),
     range VARCHAR(256),
     shore_side INT DEFAULT 0,

http://dive4elements.wald.intevation.org