diff schema/tap_tests_data.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 1ecfe5d015b0
line wrap: on
line diff
--- a/schema/tap_tests_data.sql	Wed Jun 12 17:10:49 2019 +0200
+++ b/schema/tap_tests_data.sql	Wed Jun 12 17:11:15 2019 +0200
@@ -57,7 +57,7 @@
         current_timestamp,
         'testorganization',
         current_timestamp)
-    RETURNING location, validity),
+    RETURNING location, validity, validity),
 bns AS (
     VALUES (
         'testbottleneck1',
@@ -65,19 +65,19 @@
             ('AT', 'XXX', '00001', '00000', 2)::isrs),
         ST_geomfromtext('MULTIPOLYGON(((0 0, 0 1, 1 1, 1 0, 0 0)))', 4326),
         'AT', 'AT', 'AT',
-        1, 'depth', 'testorganization', false
+        1, 'depth', current_timestamp, 'testorganization', false
     ), (
         'testbottleneck2',
         isrsrange(('AT', 'XXX', '00001', '00000', 0)::isrs,
             ('AT', 'XXX', '00001', '00000', 2)::isrs),
         ST_geomfromtext('MULTIPOLYGON(((0 0, 0 1, 1 1, 1 0, 0 0)))', 4326),
         'AT', 'AT', 'AT',
-        1, 'depth', 'testorganization', true
+        1, 'depth', current_timestamp, 'testorganization', true
     ))
 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, staging_done)
+    revisiting_time, limiting, date_info, source_organization, staging_done)
     SELECT * FROM gs, bns;
 
 INSERT INTO waterway.distance_marks_virtual VALUES (