annotate src/test/resources/datasets/clean_and_seed.sql @ 1306:902bc2190fec

Set postgresql version to 9.5 in dockerfile for more jsonb support.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 08 Mar 2017 09:41:14 +0100
parents b652f4c9b75c
children
rev   line source
977
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
1 SET search_path TO stammdaten;
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
2
980
1da90ad6b35f Correct comment.
Tom Gottfried <tom@intevation.de>
parents: 977
diff changeset
3 -- cleanup
977
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
4 DELETE FROM auth;
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
5 DELETE FROM ort;
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
6 DELETE FROM ort_typ;
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
7 DELETE FROM pflicht_messgroesse;
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
8 DELETE FROM datenbasis;
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
9 DELETE FROM mess_einheit;
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
10 DELETE FROM messgroesse;
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
11 DELETE FROM mess_methode;
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
12 DELETE FROM datensatz_erzeuger;
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
13 DELETE FROM mess_stelle;
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
14 DELETE FROM probenehmer;
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
15 DELETE FROM messprogramm_kategorie;
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
16 DELETE FROM netz_betreiber;
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
17 DELETE FROM probenart;
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
18 DELETE FROM proben_zusatz;
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
19 DELETE FROM koordinaten_art;
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
20 DELETE FROM staat;
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
21 DELETE FROM umwelt;
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
22 DELETE FROM verwaltungseinheit;
1243
b652f4c9b75c Add automatic tests for DeskriptorService.
Tom Gottfried <tom@intevation.de>
parents: 1232
diff changeset
23 DELETE FROM deskriptoren;
977
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
24
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
25 -- seed
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
26 -- minimal master data to make interface tests runnable
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
27 INSERT INTO ort_typ (id) VALUES (1);
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
28 INSERT INTO datenbasis (id) VALUES (9);
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
29 INSERT INTO mess_einheit (id) VALUES (207);
1097
186d602e031a Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 980
diff changeset
30 INSERT INTO mess_einheit (id) VALUES (208);
977
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
31 INSERT INTO messgroesse (id, messgroesse) VALUES (56, 'Mangan');
1097
186d602e031a Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 980
diff changeset
32 INSERT INTO messgroesse (id, messgroesse) VALUES (57, 'Mangan');
186d602e031a Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 980
diff changeset
33 INSERT INTO mess_methode (id) VALUES ('A3');
977
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
34 INSERT INTO netz_betreiber (id) VALUES ('06');
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
35 INSERT INTO mess_stelle (id, netzbetreiber_id) VALUES ('06010', '06');
1097
186d602e031a Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 980
diff changeset
36 INSERT INTO pflicht_messgroesse (id, mmt_id, datenbasis_id) VALUES (33, 'A3', 9);
977
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
37 INSERT INTO probenart (id, probenart, probenart_eudf_id) VALUES (1, 'E', 'A');
1097
186d602e031a Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 980
diff changeset
38 INSERT INTO probenart (id, probenart, probenart_eudf_id) VALUES (2, 'S', 'B');
977
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
39 INSERT INTO proben_zusatz (id, beschreibung, zusatzwert)
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
40 VALUES ('A74', 'Volumenstrom', 'VOLSTR');
1097
186d602e031a Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 980
diff changeset
41 INSERT INTO proben_zusatz (id, beschreibung, zusatzwert)
186d602e031a Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 980
diff changeset
42 VALUES ('A75', 'Volumenstrom', 'VOLSTR');
186d602e031a Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 980
diff changeset
43 INSERT INTO proben_zusatz (id, beschreibung, zusatzwert)
186d602e031a Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 980
diff changeset
44 VALUES ('A76', 'Volumenstrom', 'VOLSTR');
977
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
45 INSERT INTO koordinaten_art (id) VALUES (5);
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
46 INSERT INTO staat (id, staat, hkl_id, staat_iso)
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
47 VALUES (0, 'Deutschland', 0, 'DE');
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
48 INSERT INTO umwelt (id, umwelt_bereich) VALUES ('L6', 'Spurenmessung Luft');
1097
186d602e031a Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 980
diff changeset
49 INSERT INTO umwelt (id, umwelt_bereich) VALUES ('A6', 'Umweltbereich für test');
977
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
50 INSERT INTO verwaltungseinheit (
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
51 id, bundesland, bezeichnung,
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
52 is_bundesland, is_gemeinde, is_landkreis, is_regbezirk)
1232
93918aca306e Adapt tests to model changes in rev 1bc8ab13e1f7.
Tom Gottfried <tom@intevation.de>
parents: 1097
diff changeset
53 VALUES ('11000000', '11000000', 'Berlin', true, true, true, false);
1097
186d602e031a Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 980
diff changeset
54 INSERT INTO probenehmer (
186d602e031a Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 980
diff changeset
55 id, netzbetreiber_id, prn_id, bezeichnung, kurz_bezeichnung)
186d602e031a Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 980
diff changeset
56 VALUES (726, '06', 'prn', 'test', 'test');
977
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
57
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
58 -- authorization data needed for tests
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
59 INSERT INTO auth (ldap_group, netzbetreiber_id, mst_id, funktion_id)
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
60 VALUES ('mst_06_status', '06', '06010', 1);
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
61 INSERT INTO auth (ldap_group, netzbetreiber_id, funktion_id)
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
62 VALUES ('land_06_stamm', '06', 4);
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)