Mercurial > gemma
diff schema/gemma.sql @ 5031:8c590ef35280
Improve feedback if geometry cannot be stored
This is also a backout of rev. 36a3dce20232
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 18 Mar 2020 19:19:09 +0100 |
parents | 737d7859dd86 |
children | e21cbb9768a2 f64ff954ee31 |
line wrap: on
line diff
--- a/schema/gemma.sql Wed Mar 18 18:42:30 2020 +0100 +++ b/schema/gemma.sql Wed Mar 18 19:19:09 2020 +0100 @@ -708,7 +708,8 @@ CREATE TABLE fairway_dimensions ( id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, area geography(MULTIPOLYGON, 4326) NOT NULL - CHECK(ST_IsValid(CAST(area AS geometry))), + CHECK(ST_IsValid(CAST(area AS geometry)) + AND NOT ST_IsEmpty(CAST(area AS geometry))), level_of_service smallint NOT NULL REFERENCES levels_of_service, min_width smallint NOT NULL, max_width smallint NOT NULL,