annotate src/test/resources/datasets/clean_and_seed.sql @ 988:5efb32a41b24

Fix CHECK-Constraint definition.
author Tom Gottfried <tom@intevation.de>
date Fri, 01 Jul 2016 10:32:44 +0200
parents 1da90ad6b35f
children ea550e9a09a3 186d602e031a
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;
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
23
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
24 -- seed
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
25 -- 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
26 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
27 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
28 INSERT INTO mess_einheit (id) VALUES (207);
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 messgroesse (id, messgroesse) VALUES (56, 'Mangan');
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
30 INSERT INTO mess_methode (id) VALUES ('GI');
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 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
32 INSERT INTO mess_stelle (id, netzbetreiber_id) VALUES ('06010', '06');
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
33 INSERT INTO pflicht_messgroesse (id, datenbasis_id) VALUES (33, 9);
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 probenart (id, probenart, probenart_eudf_id) VALUES (1, 'E', 'A');
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 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
36 VALUES ('A74', 'Volumenstrom', 'VOLSTR');
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 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
38 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
39 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
40 INSERT INTO umwelt (id, umwelt_bereich) VALUES ('L6', 'Spurenmessung Luft');
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
41 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
42 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
43 is_bundesland, is_gemeinde, is_landkreis, is_regbezirk)
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
44 VALUES ('11000000', '11000000', 'Berlin', 1, 1, 1, 0);
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
45
aba3a5384c69 Use a minimal set of master data based on empty database for tests.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
46 -- 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
47 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
48 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
49 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
50 VALUES ('land_06_stamm', '06', 4);
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)