Mercurial > gemma
diff schema/gemma_tests.sql @ 5016:cf25b23e3eec
Keep historic data of waterway axis
... and accordingly configure the respective layer as WMS-T.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 13 Mar 2020 17:34:59 +0100 |
parents | e8b2dc771f9e |
children | e21cbb9768a2 |
line wrap: on
line diff
--- a/schema/gemma_tests.sql Fri Mar 13 14:13:32 2020 +0100 +++ b/schema/gemma_tests.sql Fri Mar 13 17:34:59 2020 +0100 @@ -32,6 +32,19 @@ 23505, NULL, 'No duplicate geometries can be inserted into waterway_axis'); +SELECT lives_ok($$ + INSERT INTO waterway.waterway_axis (wtwaxs, objnam, validity) VALUES ( + ST_GeogFromText('MULTILINESTRING((0 0, 1 1))'), + 'test', + tstzrange(NULL, current_timestamp) + ), ( + ST_GeogFromText('MULTILINESTRING((0 0, 1 1))'), + 'test', + tstzrange(current_timestamp, NULL) + ) + $$, + 'Duplicate axis geometries can be inserted if validity differs'); + SELECT throws_ok($$ INSERT INTO waterway.waterway_area (area) VALUES (ST_GeogFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))')),