Mercurial > gemma
comparison schema/tap_tests_data.sql @ 182:4df4e4bf480e
Beautify SQL
E.g. indent with 4 spaces more consequently.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 18 Jul 2018 16:48:27 +0200 |
parents | 4e2451d561b1 |
children | 5dc8e734487a |
comparison
equal
deleted
inserted
replaced
181:e509eccff303 | 182:4df4e4bf480e |
---|---|
1 SET search_path TO public, gemma, gemma_waterway, gemma_fairway; | 1 SET search_path TO public, gemma, gemma_waterway, gemma_fairway; |
2 | 2 |
3 INSERT INTO countries VALUES ('AT'), ('RO'); | 3 INSERT INTO countries VALUES ('AT'), ('RO'); |
4 | 4 |
5 INSERT INTO responsibility_areas VALUES | 5 INSERT INTO responsibility_areas VALUES |
6 ('AT', ST_geomfromtext('MULTIPOLYGON(((0 0, 0 1, 1 1, 1 0, 0 0)))', 4326)); | 6 ('AT', ST_geomfromtext('MULTIPOLYGON(((0 0, 0 1, 1 1, 1 0, 0 0)))', 4326)); |
7 | 7 |
8 INSERT INTO user_profiles (username, country, email_adress) | 8 INSERT INTO user_profiles (username, country, email_adress) |
9 VALUES | 9 VALUES |
10 ('waterway_user', 'AT', 'xxx'), | 10 ('waterway_user', 'AT', 'xxx'), |
11 ('waterway_user2', 'RO', 'xxy'), | 11 ('waterway_user2', 'RO', 'xxy'), |
12 ('waterway_admin', 'AT', 'yyy'), | 12 ('waterway_admin', 'AT', 'yyy'), |
13 ('sys_admin', 'AT', 'zzz'); | 13 ('sys_admin', 'AT', 'zzz'); |
14 | 14 |
15 INSERT INTO limiting_factors VALUES ('depth'), ('width'); | 15 INSERT INTO limiting_factors VALUES ('depth'), ('width'); |
16 | 16 |
17 INSERT INTO gauges ( | 17 INSERT INTO gauges ( |
18 location, function_code, objname, geom, zero_point, source_organization) | 18 location, function_code, objname, geom, zero_point, source_organization) |
19 VALUES | 19 VALUES ( |
20 (('AT', 'XXX', '00001', '00000', 1)::isrs, | 20 ('AT', 'XXX', '00001', '00000', 1)::isrs, |
21 'xxx', | 21 'xxx', |
22 'testgauge', | 22 'testgauge', |
23 ST_geomfromtext('POINT(0 0)', 4326), | 23 ST_geomfromtext('POINT(0 0)', 4326), |
24 0, | 24 0, |
25 'testorganization'); | 25 'testorganization' |
26 ); | |
26 | 27 |
27 INSERT INTO bottlenecks ( | 28 INSERT INTO bottlenecks ( |
28 bottleneck_id, fk_g_fid, stretch, area, rb, lb, responsible_country, | 29 bottleneck_id, fk_g_fid, stretch, area, rb, lb, responsible_country, |
29 revisiting_time, limiting, source_organization, staging_done) | 30 revisiting_time, limiting, source_organization, staging_done) |
30 VALUES | 31 VALUES ( |
31 ('testbottleneck1', | 32 'testbottleneck1', |
32 ('AT', 'XXX', '00001', '00000', 1)::isrs, | 33 ('AT', 'XXX', '00001', '00000', 1)::isrs, |
33 isrsrange(('AT', 'XXX', '00001', '00000', 0)::isrs, | 34 isrsrange(('AT', 'XXX', '00001', '00000', 0)::isrs, |
34 ('AT', 'XXX', '00001', '00000', 2)::isrs), | 35 ('AT', 'XXX', '00001', '00000', 2)::isrs), |
35 ST_geomfromtext('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), | 36 ST_geomfromtext('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), |
36 'AT', 'AT', 'AT', | 37 'AT', 'AT', 'AT', |
37 1, 'depth', 'testorganization', false), | 38 1, 'depth', 'testorganization', false |
38 ('testbottleneck2', | 39 ), ( |
40 'testbottleneck2', | |
39 ('AT', 'XXX', '00001', '00000', 1)::isrs, | 41 ('AT', 'XXX', '00001', '00000', 1)::isrs, |
40 isrsrange(('AT', 'XXX', '00001', '00000', 0)::isrs, | 42 isrsrange(('AT', 'XXX', '00001', '00000', 0)::isrs, |
41 ('AT', 'XXX', '00001', '00000', 2)::isrs), | 43 ('AT', 'XXX', '00001', '00000', 2)::isrs), |
42 ST_geomfromtext('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), | 44 ST_geomfromtext('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), |
43 'AT', 'AT', 'AT', | 45 'AT', 'AT', 'AT', |
44 1, 'depth', 'testorganization', true); | 46 1, 'depth', 'testorganization', true |
47 ); | |
45 | 48 |
46 INSERT INTO templates (template_name, template_data) | 49 INSERT INTO templates (template_name, template_data) |
47 VALUES ('AT', '\x'), ('RO', '\x'); | 50 VALUES ('AT', '\x'), ('RO', '\x'); |
48 INSERT INTO user_templates | 51 INSERT INTO user_templates |
49 VALUES ('waterway_user', 'AT'), ('waterway_user2', 'RO'); | 52 VALUES ('waterway_user', 'AT'), ('waterway_user2', 'RO'); |