comparison 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
comparison
equal deleted inserted replaced
3644:9e91b416d5bb 3645:02951a62e8c6
73 -- 73 --
74 SET SESSION AUTHORIZATION test_admin_at; 74 SET SESSION AUTHORIZATION test_admin_at;
75 75
76 PREPARE bn_insert (varchar, geometry(MULTIPOLYGON, 4326)) AS 76 PREPARE bn_insert (varchar, geometry(MULTIPOLYGON, 4326)) AS
77 INSERT INTO waterway.bottlenecks ( 77 INSERT INTO waterway.bottlenecks (
78 gauge_location, gauge_validity, 78 gauge_location, gauge_validity, validity,
79 bottleneck_id, stretch, area, rb, lb, responsible_country, 79 bottleneck_id, stretch, area, rb, lb, responsible_country,
80 revisiting_time, limiting, source_organization) 80 revisiting_time, limiting, date_info, source_organization)
81 SELECT 81 SELECT
82 location, validity, 82 location, validity, validity,
83 $1, 83 $1,
84 isrsrange(('AT', 'XXX', '00001', '00000', 0)::isrs, 84 isrsrange(('AT', 'XXX', '00001', '00000', 0)::isrs,
85 ('AT', 'XXX', '00001', '00000', 2)::isrs), 85 ('AT', 'XXX', '00001', '00000', 2)::isrs),
86 $2, 'AT', 'AT', 'AT', 86 $2, 'AT', 'AT', 'AT',
87 1, 'depth', 'testorganization' 87 1, 'depth', current_timestamp, 'testorganization'
88 FROM waterway.gauges 88 FROM waterway.gauges
89 WHERE location = ('AT', 'XXX', '00001', 'G0001', 1)::isrs; 89 WHERE location = ('AT', 'XXX', '00001', 'G0001', 1)::isrs;
90 SELECT lives_ok($$ 90 SELECT lives_ok($$
91 EXECUTE bn_insert( 91 EXECUTE bn_insert(
92 'test1', 92 'test1',