diff schema/auth_tests.sql @ 3645:02951a62e8c6

'Historicise' bottlenecks on import
author Tom Gottfried <tom@intevation.de>
date Wed, 12 Jun 2019 17:11:15 +0200
parents ec6163c6687d
children 29ef6d41e4af
line wrap: on
line diff
--- a/schema/auth_tests.sql	Wed Jun 12 17:10:49 2019 +0200
+++ b/schema/auth_tests.sql	Wed Jun 12 17:11:15 2019 +0200
@@ -75,16 +75,16 @@
 
 PREPARE bn_insert (varchar, geometry(MULTIPOLYGON, 4326)) AS
     INSERT INTO waterway.bottlenecks (
-        gauge_location, gauge_validity,
+        gauge_location, gauge_validity, validity,
         bottleneck_id, stretch, area, rb, lb, responsible_country,
-        revisiting_time, limiting, source_organization)
+        revisiting_time, limiting, date_info, source_organization)
         SELECT
-            location, validity,
+            location, validity, validity,
             $1,
             isrsrange(('AT', 'XXX', '00001', '00000', 0)::isrs,
                 ('AT', 'XXX', '00001', '00000', 2)::isrs),
             $2, 'AT', 'AT', 'AT',
-            1, 'depth', 'testorganization'
+            1, 'depth', current_timestamp, 'testorganization'
         FROM waterway.gauges
         WHERE location = ('AT', 'XXX', '00001', 'G0001', 1)::isrs;
 SELECT lives_ok($$