Mercurial > gemma
annotate schema/tap_tests_data.sql @ 495:5c08afd15ce7 metamorph-for-all
Give file containing the session store a more suited name.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 24 Aug 2018 14:28:05 +0200 |
parents | 3af7ca761f6a |
children | f3452ce5c056 |
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 |
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
20 INSERT INTO limiting_factors VALUES ('depth'), ('width'); |
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 ( |
182 | 23 location, function_code, objname, geom, zero_point, source_organization) |
24 VALUES ( | |
25 ('AT', 'XXX', '00001', '00000', 1)::isrs, | |
108
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
26 'xxx', |
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
27 'testgauge', |
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
28 ST_geomfromtext('POINT(0 0)', 4326), |
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
29 0, |
182 | 30 'testorganization' |
31 ); | |
108
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
32 |
195
5dc8e734487a
Introduce database schemas as privilege-based namespaces
Tom Gottfried <tom@intevation.de>
parents:
182
diff
changeset
|
33 INSERT INTO waterway.bottlenecks ( |
182 | 34 bottleneck_id, fk_g_fid, stretch, area, rb, lb, responsible_country, |
35 revisiting_time, limiting, source_organization, staging_done) | |
36 VALUES ( | |
37 'testbottleneck1', | |
108
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
38 ('AT', 'XXX', '00001', '00000', 1)::isrs, |
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
39 isrsrange(('AT', 'XXX', '00001', '00000', 0)::isrs, |
182 | 40 ('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
|
41 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
|
42 'AT', 'AT', 'AT', |
182 | 43 1, 'depth', 'testorganization', false |
44 ), ( | |
45 'testbottleneck2', | |
108
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
46 ('AT', 'XXX', '00001', '00000', 1)::isrs, |
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
47 isrsrange(('AT', 'XXX', '00001', '00000', 0)::isrs, |
182 | 48 ('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
|
49 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
|
50 'AT', 'AT', 'AT', |
182 | 51 1, 'depth', 'testorganization', true |
52 ); | |
108
f6aba3ee3a75
Put test data in own file for easier debugging.
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
53 |
195
5dc8e734487a
Introduce database schemas as privilege-based namespaces
Tom Gottfried <tom@intevation.de>
parents:
182
diff
changeset
|
54 INSERT INTO users.templates (template_name, template_data) |
182 | 55 VALUES ('AT', '\x'), ('RO', '\x'); |
195
5dc8e734487a
Introduce database schemas as privilege-based namespaces
Tom Gottfried <tom@intevation.de>
parents:
182
diff
changeset
|
56 INSERT INTO users.user_templates |
224
57dfab80973c
By convention, prefix all test users with 'test'
Tom Gottfried <tom@intevation.de>
parents:
211
diff
changeset
|
57 VALUES ('test_user_at', 'AT'), ('test_user_ro', 'RO'); |