Mercurial > gemma
annotate schema/tap_tests_data.sql @ 1234:1a5564655f2a
refac: Sidebar reorganized
In order to make context switches between administrative tasks
which are map related and those which are system related, we now have
a category "administration" and "systemadministration".
The Riverbedmorphology does nothing than display the map, so it is
renamed to that (map). In case the context of "systemadministration"
is chosen, the "map" brings you just back to the map.
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 20 Nov 2018 09:54:53 +0100 |
parents | e78bdbb6cac8 |
children | 6590208e3ee1 |
rev | line source |
---|---|
195
5dc8e734487a
Introduce database schemas as privilege-based namespaces
Tom Gottfried <tom@intevation.de>
parents:
182
diff
changeset
|
1 -- |
5dc8e734487a
Introduce database schemas as privilege-based namespaces
Tom Gottfried <tom@intevation.de>
parents:
182
diff
changeset
|
2 -- Test data used in *_tests.sql scripts |
5dc8e734487a
Introduce database schemas as privilege-based namespaces
Tom Gottfried <tom@intevation.de>
parents:
182
diff
changeset
|
3 -- |
109
0e486e6ee60d
Set search path in test data script for standalone use.
Tom Gottfried <tom@intevation.de>
parents:
108
diff
changeset
|
4 |
177
4e2451d561b1
Make schema for templates more realistic
Tom Gottfried <tom@intevation.de>
parents:
136
diff
changeset
|
5 INSERT INTO countries VALUES ('AT'), ('RO'); |
108
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
6 |
195
5dc8e734487a
Introduce database schemas as privilege-based namespaces
Tom Gottfried <tom@intevation.de>
parents:
182
diff
changeset
|
7 INSERT INTO users.responsibility_areas VALUES |
211
e7826710d9c4
Make responsibility area mandatory
Tom Gottfried <tom@intevation.de>
parents:
207
diff
changeset
|
8 ('AT', ST_geomfromtext('MULTIPOLYGON(((0 0, 0 1, 1 1, 1 0, 0 0)))', 4326)), |
e7826710d9c4
Make responsibility area mandatory
Tom Gottfried <tom@intevation.de>
parents:
207
diff
changeset
|
9 ('RO', ST_geomfromtext('MULTIPOLYGON(((1 0, 1 1, 2 1, 2 0, 1 0)))', 4326)); |
108
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
10 |
343
5b03f420957d
Use INSTEAD OF trigger for user creation
Tom Gottfried <tom@intevation.de>
parents:
319
diff
changeset
|
11 INSERT INTO users.list_users VALUES ( |
262
92470caf81fd
Add database function to check password against policy
Tom Gottfried <tom@intevation.de>
parents:
224
diff
changeset
|
12 'waterway_user', 'test_user_at', 'user_at1$', 'AT', NULL, 'xxx'); |
343
5b03f420957d
Use INSTEAD OF trigger for user creation
Tom Gottfried <tom@intevation.de>
parents:
319
diff
changeset
|
13 INSERT INTO users.list_users VALUES ( |
262
92470caf81fd
Add database function to check password against policy
Tom Gottfried <tom@intevation.de>
parents:
224
diff
changeset
|
14 'waterway_user', 'test_user_ro', 'user_ro1$', 'RO', NULL, 'xxy'); |
343
5b03f420957d
Use INSTEAD OF trigger for user creation
Tom Gottfried <tom@intevation.de>
parents:
319
diff
changeset
|
15 INSERT INTO users.list_users VALUES ( |
262
92470caf81fd
Add database function to check password against policy
Tom Gottfried <tom@intevation.de>
parents:
224
diff
changeset
|
16 'waterway_admin', 'test_admin_at', 'admin_at1$', 'AT', NULL, 'yyy'); |
343
5b03f420957d
Use INSTEAD OF trigger for user creation
Tom Gottfried <tom@intevation.de>
parents:
319
diff
changeset
|
17 INSERT INTO users.list_users VALUES ( |
262
92470caf81fd
Add database function to check password against policy
Tom Gottfried <tom@intevation.de>
parents:
224
diff
changeset
|
18 'sys_admin', 'test_sys_admin1', 'sys_admin1$', 'AT', NULL, 'zzz'); |
108
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
19 |
577
e6c9d2da2e20
Backed out changeset f3452ce5c056
Tom Gottfried <tom@intevation.de>
parents:
567
diff
changeset
|
20 INSERT INTO limiting_factors VALUES ('depth'), ('width'); |
108
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
21 |
195
5dc8e734487a
Introduce database schemas as privilege-based namespaces
Tom Gottfried <tom@intevation.de>
parents:
182
diff
changeset
|
22 INSERT INTO waterway.gauges ( |
580
e78bdbb6cac8
Remove worthless attribute
Tom Gottfried <tom@intevation.de>
parents:
579
diff
changeset
|
23 location, objname, geom, zero_point, source_organization) |
182 | 24 VALUES ( |
579
642df1164aca
Ensure gauges are identified by appropriate ISRS location code
Tom Gottfried <tom@intevation.de>
parents:
577
diff
changeset
|
25 ('AT', 'XXX', '00001', 'G0001', 1)::isrs, |
108
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
26 'testgauge', |
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
27 ST_geomfromtext('POINT(0 0)', 4326), |
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
28 0, |
182 | 29 'testorganization' |
30 ); | |
108
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
31 |
195
5dc8e734487a
Introduce database schemas as privilege-based namespaces
Tom Gottfried <tom@intevation.de>
parents:
182
diff
changeset
|
32 INSERT INTO waterway.bottlenecks ( |
182 | 33 bottleneck_id, fk_g_fid, stretch, area, rb, lb, responsible_country, |
34 revisiting_time, limiting, source_organization, staging_done) | |
35 VALUES ( | |
36 'testbottleneck1', | |
579
642df1164aca
Ensure gauges are identified by appropriate ISRS location code
Tom Gottfried <tom@intevation.de>
parents:
577
diff
changeset
|
37 ('AT', 'XXX', '00001', 'G0001', 1)::isrs, |
108
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
38 isrsrange(('AT', 'XXX', '00001', '00000', 0)::isrs, |
182 | 39 ('AT', 'XXX', '00001', '00000', 2)::isrs), |
108
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
40 ST_geomfromtext('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), |
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
41 'AT', 'AT', 'AT', |
182 | 42 1, 'depth', 'testorganization', false |
43 ), ( | |
44 'testbottleneck2', | |
579
642df1164aca
Ensure gauges are identified by appropriate ISRS location code
Tom Gottfried <tom@intevation.de>
parents:
577
diff
changeset
|
45 ('AT', 'XXX', '00001', 'G0001', 1)::isrs, |
108
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
46 isrsrange(('AT', 'XXX', '00001', '00000', 0)::isrs, |
182 | 47 ('AT', 'XXX', '00001', '00000', 2)::isrs), |
108
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
48 ST_geomfromtext('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), |
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
49 'AT', 'AT', 'AT', |
182 | 50 1, 'depth', 'testorganization', true |
51 ); | |
108
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
52 |
195
5dc8e734487a
Introduce database schemas as privilege-based namespaces
Tom Gottfried <tom@intevation.de>
parents:
182
diff
changeset
|
53 INSERT INTO users.templates (template_name, template_data) |
182 | 54 VALUES ('AT', '\x'), ('RO', '\x'); |
195
5dc8e734487a
Introduce database schemas as privilege-based namespaces
Tom Gottfried <tom@intevation.de>
parents:
182
diff
changeset
|
55 INSERT INTO users.user_templates |
224
57dfab80973c
By convention, prefix all test users with 'test'
Tom Gottfried <tom@intevation.de>
parents:
211
diff
changeset
|
56 VALUES ('test_user_at', 'AT'), ('test_user_ro', 'RO'); |