Mercurial > gemma
comparison schema/tap_tests_data.sql @ 113:25b28fd0e256
Moved schema stuff to own subfolder.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 26 Jun 2018 16:14:59 +0200 |
parents | tap_tests_data.sql@0e486e6ee60d |
children | d349db18bece |
comparison
equal
deleted
inserted
replaced
112:894f633e2d3f | 113:25b28fd0e256 |
---|---|
1 SET search_path TO public, wamos, wamos_waterway, wamos_fairway; | |
2 | |
3 INSERT INTO countries VALUES ('AT'); | |
4 | |
5 INSERT INTO responsibility_areas VALUES | |
6 ('AT', ST_geomfromtext('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326)); | |
7 | |
8 INSERT INTO user_profiles (username, country, email_adress) | |
9 VALUES | |
10 ('waterway_user', 'AT', 'xxx'), | |
11 ('waterway_admin', 'AT', 'yyy'), | |
12 ('sys_admin', 'AT', 'zzz'); | |
13 | |
14 INSERT INTO limiting_factors VALUES ('depth'), ('width'); | |
15 | |
16 INSERT INTO gauges ( | |
17 location, function_code, objname, geom, zero_point, source_organization) | |
18 VALUES | |
19 (('AT', 'XXX', '00001', '00000', 1)::isrs, | |
20 'xxx', | |
21 'testgauge', | |
22 ST_geomfromtext('POINT(0 0)', 4326), | |
23 0, | |
24 'testorganization'); | |
25 | |
26 INSERT INTO bottlenecks ( | |
27 bottleneck_id, fk_g_fid, stretch, area, rb, lb, responsible_country, | |
28 revisiting_time, limiting, source_organization, staging_done) | |
29 VALUES | |
30 ('testbottleneck1', | |
31 ('AT', 'XXX', '00001', '00000', 1)::isrs, | |
32 isrsrange(('AT', 'XXX', '00001', '00000', 0)::isrs, | |
33 ('AT', 'XXX', '00001', '00000', 2)::isrs), | |
34 ST_geomfromtext('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), | |
35 'AT', 'AT', 'AT', | |
36 1, 'depth', 'testorganization', false), | |
37 ('testbottleneck2', | |
38 ('AT', 'XXX', '00001', '00000', 1)::isrs, | |
39 isrsrange(('AT', 'XXX', '00001', '00000', 0)::isrs, | |
40 ('AT', 'XXX', '00001', '00000', 2)::isrs), | |
41 ST_geomfromtext('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), | |
42 'AT', 'AT', 'AT', | |
43 1, 'depth', 'testorganization', true); | |
44 | |
45 INSERT INTO templates (dummy_attrib) | |
46 VALUES ('usertemplate'), ('othertemplate'); | |
47 INSERT INTO user_templates | |
48 SELECT 'waterway_user', id FROM templates | |
49 WHERE dummy_attrib = 'usertemplate'; |