Mercurial > lada > lada-server
comparison db_schema/lada_schema.sql @ 808:2b0d99fbeecc
Updated database schema.
Added tables for probenehmer, datensatz_erzeuger, messprogramm_kategorie.
Updated table ort.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 02 Dec 2015 14:06:48 +0100 |
parents | 2059ac26fd49 |
children | 6e5a0edba363 |
comparison
equal
deleted
inserted
replaced
806:fee42d7b2f33 | 808:2b0d99fbeecc |
---|---|
428 NO MAXVALUE | 428 NO MAXVALUE |
429 CACHE 1; | 429 CACHE 1; |
430 | 430 |
431 | 431 |
432 -- | 432 -- |
433 -- Name: ort; Type: TABLE; Schema: bund; Owner: -; Tablespace: | 433 -- Name: ortszuordnung; Type: TABLE; Schema: bund; Owner: -; Tablespace: |
434 -- | 434 -- |
435 | 435 |
436 CREATE TABLE ort ( | 436 CREATE TABLE ortszuordnung ( |
437 id integer DEFAULT nextval('ort_id_seq'::regclass) NOT NULL, | 437 id integer DEFAULT nextval('ort_id_seq'::regclass) NOT NULL, |
438 probe_id integer NOT NULL, | 438 probe_id integer NOT NULL, |
439 ort_id bigint NOT NULL, | 439 ort_id bigint NOT NULL, |
440 orts_typ character varying(1), | 440 ortszuordnung_typ character varying(1), |
441 ortszusatztext character varying(100), | 441 ortszusatztext character varying(100), |
442 letzte_aenderung timestamp without time zone DEFAULT now() | 442 letzte_aenderung timestamp without time zone DEFAULT now() |
443 ); | 443 ); |
444 | 444 |
445 | 445 |
446 -- | 446 -- |
447 -- Name: COLUMN ort.orts_typ; Type: COMMENT; Schema: bund; Owner: - | 447 -- Name: COLUMN ortszuordnung.ortszuordnung_typ; Type: COMMENT; Schema: bund; Owner: - |
448 -- | 448 -- |
449 | 449 |
450 COMMENT ON COLUMN ort.orts_typ IS 'E = Entnahmeport, U = Ursprungsort, Z = Ortszusatz'; | 450 COMMENT ON COLUMN ortszuordnung.ortszuordnung_typ IS 'E = Entnahmeport, U = Ursprungsort, Z = Ortszusatz'; |
451 | 451 |
452 | 452 |
453 -- | 453 -- |
454 -- Name: probe_id_seq; Type: SEQUENCE; Schema: bund; Owner: - | 454 -- Name: probe_id_seq; Type: SEQUENCE; Schema: bund; Owner: - |
455 -- | 455 -- |
764 ) | 764 ) |
765 INHERITS (bund.messwert); | 765 INHERITS (bund.messwert); |
766 | 766 |
767 | 767 |
768 -- | 768 -- |
769 -- Name: ort; Type: TABLE; Schema: land; Owner: -; Tablespace: | 769 -- Name: ortszuordnung; Type: TABLE; Schema: land; Owner: -; Tablespace: |
770 -- | 770 -- |
771 | 771 |
772 CREATE TABLE ort ( | 772 CREATE TABLE ortszuordnung ( |
773 tree_modified timestamp without time zone DEFAULT now() | 773 tree_modified timestamp without time zone DEFAULT now() |
774 ) | 774 ) |
775 INHERITS (bund.ort); | 775 INHERITS (bund.ortszuordnung); |
776 | 776 |
777 | 777 |
778 -- | 778 -- |
779 -- Name: probe; Type: TABLE; Schema: land; Owner: -; Tablespace: | 779 -- Name: probe; Type: TABLE; Schema: land; Owner: -; Tablespace: |
780 -- | 780 -- |
961 -- | 961 -- |
962 -- Name: datenbasis_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: - | 962 -- Name: datenbasis_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: - |
963 -- | 963 -- |
964 | 964 |
965 ALTER SEQUENCE datenbasis_id_seq OWNED BY datenbasis.id; | 965 ALTER SEQUENCE datenbasis_id_seq OWNED BY datenbasis.id; |
966 | |
967 | |
968 -- | |
969 -- Name: datensatz_erzeuger; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: | |
970 -- | |
971 | |
972 CREATE TABLE datensatz_erzeuger ( | |
973 id integer NOT NULL, | |
974 netzbetreiber_id character varying(2), | |
975 da_erzeuger_id character varying(2), | |
976 mst_id character varying(5), | |
977 bezeichnung character varying(120), | |
978 letzte_aenderung timestamp without time zone | |
979 ); | |
980 | |
981 | |
982 -- | |
983 -- Name: datensatz_erzeuger_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: - | |
984 -- | |
985 | |
986 CREATE SEQUENCE datensatz_erzeuger_id_seq | |
987 START WITH 1 | |
988 INCREMENT BY 1 | |
989 NO MINVALUE | |
990 NO MAXVALUE | |
991 CACHE 1; | |
992 | |
993 | |
994 -- | |
995 -- Name: datensatz_erzeuger_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: - | |
996 -- | |
997 | |
998 ALTER SEQUENCE datensatz_erzeuger_id_seq OWNED BY datensatz_erzeuger.id; | |
966 | 999 |
967 | 1000 |
968 -- | 1001 -- |
969 -- Name: de_vg; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: | 1002 -- Name: de_vg; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: |
970 -- | 1003 -- |
1217 | 1250 |
1218 ALTER SEQUENCE messgroessen_gruppe_id_seq OWNED BY messgroessen_gruppe.id; | 1251 ALTER SEQUENCE messgroessen_gruppe_id_seq OWNED BY messgroessen_gruppe.id; |
1219 | 1252 |
1220 | 1253 |
1221 -- | 1254 -- |
1255 -- Name: messprogramm_kategorie; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: | |
1256 -- | |
1257 | |
1258 CREATE TABLE messprogramm_kategorie ( | |
1259 id integer NOT NULL, | |
1260 netzbetreiber_id character varying(2), | |
1261 mpl_id character varying(3), | |
1262 bezeichnung character varying(120), | |
1263 letzte_aenderung timestamp without time zone | |
1264 ); | |
1265 | |
1266 | |
1267 -- | |
1268 -- Name: messprogramm_kategorie_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: - | |
1269 -- | |
1270 | |
1271 CREATE SEQUENCE messprogramm_kategorie_id_seq | |
1272 START WITH 1 | |
1273 INCREMENT BY 1 | |
1274 NO MINVALUE | |
1275 NO MAXVALUE | |
1276 CACHE 1; | |
1277 | |
1278 | |
1279 -- | |
1280 -- Name: messprogramm_kategorie_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: - | |
1281 -- | |
1282 | |
1283 ALTER SEQUENCE messprogramm_kategorie_id_seq OWNED BY messprogramm_kategorie.id; | |
1284 | |
1285 | |
1286 -- | |
1222 -- Name: mg_grp; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: | 1287 -- Name: mg_grp; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: |
1223 -- | 1288 -- |
1224 | 1289 |
1225 CREATE TABLE mg_grp ( | 1290 CREATE TABLE mg_grp ( |
1226 messgroessengruppe_id integer NOT NULL, | 1291 messgroessengruppe_id integer NOT NULL, |
1269 -- Name: ort; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: | 1334 -- Name: ort; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: |
1270 -- | 1335 -- |
1271 | 1336 |
1272 CREATE TABLE ort ( | 1337 CREATE TABLE ort ( |
1273 id integer NOT NULL, | 1338 id integer NOT NULL, |
1274 o_typ character varying(1), | |
1275 netzbetreiber_id character varying(2), | 1339 netzbetreiber_id character varying(2), |
1276 bezeichnung character varying(10), | 1340 ort_id character varying(10), |
1277 beschreibung character varying(100), | 1341 langtext character varying(100), |
1278 staat_id smallint, | 1342 staat_id smallint, |
1279 gem_id character varying(8), | 1343 gem_id character varying(8), |
1280 unscharf character(1) DEFAULT NULL::bpchar, | 1344 unscharf character(1) DEFAULT NULL::bpchar, |
1281 nuts_code character varying(10), | 1345 nuts_code character varying(10), |
1282 kda_id integer, | 1346 kda_id integer, |
1285 hoehe_land real, | 1349 hoehe_land real, |
1286 letzte_aenderung timestamp without time zone DEFAULT now(), | 1350 letzte_aenderung timestamp without time zone DEFAULT now(), |
1287 latitude double precision, | 1351 latitude double precision, |
1288 longitude double precision, | 1352 longitude double precision, |
1289 geom public.geometry(Point,4326), | 1353 geom public.geometry(Point,4326), |
1290 shape public.geometry(MultiPolygon,4326) | 1354 shape public.geometry(MultiPolygon,4326), |
1291 ); | 1355 ort_typ smallint, |
1292 | 1356 kurztext character varying(15), |
1293 | 1357 berichtstext character varying(70), |
1294 -- | 1358 zone character varying(1), |
1295 -- Name: COLUMN ort.o_typ; Type: COMMENT; Schema: stammdaten; Owner: - | 1359 sektor character varying(2), |
1296 -- | 1360 zustaendigkeit character varying(10), |
1297 | 1361 mp_art character varying(10), |
1298 COMMENT ON COLUMN ort.o_typ IS 'D = dynamischer Messpunkt (nicht vordefiniert) | 1362 aktiv character(1), |
1299 V = vordefinierter Messpunkt | 1363 anlage_id integer, |
1300 R = REI-Messpunkt | 1364 oz_id integer |
1301 S = Station | 1365 ); |
1302 Z = Ortzszusatz'; | |
1303 | 1366 |
1304 | 1367 |
1305 -- | 1368 -- |
1306 -- Name: ort_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: - | 1369 -- Name: ort_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: - |
1307 -- | 1370 -- |
1320 | 1383 |
1321 ALTER SEQUENCE ort_id_seq OWNED BY ort.id; | 1384 ALTER SEQUENCE ort_id_seq OWNED BY ort.id; |
1322 | 1385 |
1323 | 1386 |
1324 -- | 1387 -- |
1388 -- Name: ort_typ; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: | |
1389 -- | |
1390 | |
1391 CREATE TABLE ort_typ ( | |
1392 id smallint NOT NULL, | |
1393 ort_typ character varying(60) | |
1394 ); | |
1395 | |
1396 | |
1397 -- | |
1398 -- Name: ortszuordnung_typ; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: | |
1399 -- | |
1400 | |
1401 CREATE TABLE ortszuordnung_typ ( | |
1402 id character(1) NOT NULL, | |
1403 ortstyp character varying(60) | |
1404 ); | |
1405 | |
1406 | |
1407 -- | |
1325 -- Name: pflicht_messgroesse; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: | 1408 -- Name: pflicht_messgroesse; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: |
1326 -- | 1409 -- |
1327 | 1410 |
1328 CREATE TABLE pflicht_messgroesse ( | 1411 CREATE TABLE pflicht_messgroesse ( |
1329 id integer NOT NULL, | 1412 id integer NOT NULL, |
1393 -- | 1476 -- |
1394 -- Name: probenart_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: - | 1477 -- Name: probenart_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: - |
1395 -- | 1478 -- |
1396 | 1479 |
1397 ALTER SEQUENCE probenart_id_seq OWNED BY probenart.id; | 1480 ALTER SEQUENCE probenart_id_seq OWNED BY probenart.id; |
1481 | |
1482 | |
1483 -- | |
1484 -- Name: probenehmer; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: | |
1485 -- | |
1486 | |
1487 CREATE TABLE probenehmer ( | |
1488 id integer NOT NULL, | |
1489 netzbetreiber_id character varying(2), | |
1490 prn_id character varying(9), | |
1491 bearbeiter character varying(25), | |
1492 bemerkung character varying(60), | |
1493 betrieb character varying(80), | |
1494 bezeichnung character varying(80), | |
1495 kurz_bezeichnung character varying(10), | |
1496 ort character varying(20), | |
1497 plz character varying(5), | |
1498 strasse character varying(30), | |
1499 telefon character varying(20), | |
1500 tp character varying(3), | |
1501 typ character(1), | |
1502 letzte_aenderung timestamp without time zone | |
1503 ); | |
1504 | |
1505 | |
1506 -- | |
1507 -- Name: probenehmer_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: - | |
1508 -- | |
1509 | |
1510 CREATE SEQUENCE probenehmer_id_seq | |
1511 START WITH 1 | |
1512 INCREMENT BY 1 | |
1513 NO MINVALUE | |
1514 NO MAXVALUE | |
1515 CACHE 1; | |
1516 | |
1517 | |
1518 -- | |
1519 -- Name: probenehmer_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: - | |
1520 -- | |
1521 | |
1522 ALTER SEQUENCE probenehmer_id_seq OWNED BY probenehmer.id; | |
1398 | 1523 |
1399 | 1524 |
1400 -- | 1525 -- |
1401 -- Name: s_00_view; Type: VIEW; Schema: stammdaten; Owner: - | 1526 -- Name: s_00_view; Type: VIEW; Schema: stammdaten; Owner: - |
1402 -- | 1527 -- |
1989 | 2114 |
1990 -- | 2115 -- |
1991 -- Name: id; Type: DEFAULT; Schema: land; Owner: - | 2116 -- Name: id; Type: DEFAULT; Schema: land; Owner: - |
1992 -- | 2117 -- |
1993 | 2118 |
1994 ALTER TABLE ONLY ort ALTER COLUMN id SET DEFAULT nextval('bund.ort_id_seq'::regclass); | 2119 ALTER TABLE ONLY ortszuordnung ALTER COLUMN id SET DEFAULT nextval('bund.ort_id_seq'::regclass); |
1995 | 2120 |
1996 | 2121 |
1997 -- | 2122 -- |
1998 -- Name: letzte_aenderung; Type: DEFAULT; Schema: land; Owner: - | 2123 -- Name: letzte_aenderung; Type: DEFAULT; Schema: land; Owner: - |
1999 -- | 2124 -- |
2000 | 2125 |
2001 ALTER TABLE ONLY ort ALTER COLUMN letzte_aenderung SET DEFAULT now(); | 2126 ALTER TABLE ONLY ortszuordnung ALTER COLUMN letzte_aenderung SET DEFAULT now(); |
2002 | 2127 |
2003 | 2128 |
2004 -- | 2129 -- |
2005 -- Name: id; Type: DEFAULT; Schema: land; Owner: - | 2130 -- Name: id; Type: DEFAULT; Schema: land; Owner: - |
2006 -- | 2131 -- |
2082 | 2207 |
2083 -- | 2208 -- |
2084 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - | 2209 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - |
2085 -- | 2210 -- |
2086 | 2211 |
2212 ALTER TABLE ONLY datensatz_erzeuger ALTER COLUMN id SET DEFAULT nextval('datensatz_erzeuger_id_seq'::regclass); | |
2213 | |
2214 | |
2215 -- | |
2216 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - | |
2217 -- | |
2218 | |
2087 ALTER TABLE ONLY de_vg ALTER COLUMN id SET DEFAULT nextval('de_vg_id_seq'::regclass); | 2219 ALTER TABLE ONLY de_vg ALTER COLUMN id SET DEFAULT nextval('de_vg_id_seq'::regclass); |
2088 | 2220 |
2089 | 2221 |
2090 -- | 2222 -- |
2091 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - | 2223 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - |
2124 | 2256 |
2125 -- | 2257 -- |
2126 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - | 2258 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - |
2127 -- | 2259 -- |
2128 | 2260 |
2261 ALTER TABLE ONLY messprogramm_kategorie ALTER COLUMN id SET DEFAULT nextval('messprogramm_kategorie_id_seq'::regclass); | |
2262 | |
2263 | |
2264 -- | |
2265 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - | |
2266 -- | |
2267 | |
2129 ALTER TABLE ONLY ort ALTER COLUMN id SET DEFAULT nextval('ort_id_seq'::regclass); | 2268 ALTER TABLE ONLY ort ALTER COLUMN id SET DEFAULT nextval('ort_id_seq'::regclass); |
2130 | 2269 |
2131 | 2270 |
2132 -- | 2271 -- |
2133 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - | 2272 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - |
2139 -- | 2278 -- |
2140 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - | 2279 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - |
2141 -- | 2280 -- |
2142 | 2281 |
2143 ALTER TABLE ONLY probenart ALTER COLUMN id SET DEFAULT nextval('probenart_id_seq'::regclass); | 2282 ALTER TABLE ONLY probenart ALTER COLUMN id SET DEFAULT nextval('probenart_id_seq'::regclass); |
2283 | |
2284 | |
2285 -- | |
2286 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - | |
2287 -- | |
2288 | |
2289 ALTER TABLE ONLY probenehmer ALTER COLUMN id SET DEFAULT nextval('probenehmer_id_seq'::regclass); | |
2144 | 2290 |
2145 | 2291 |
2146 -- | 2292 -- |
2147 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - | 2293 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - |
2148 -- | 2294 -- |
2191 ALTER TABLE ONLY messwert | 2337 ALTER TABLE ONLY messwert |
2192 ADD CONSTRAINT messwert_pkey PRIMARY KEY (id); | 2338 ADD CONSTRAINT messwert_pkey PRIMARY KEY (id); |
2193 | 2339 |
2194 | 2340 |
2195 -- | 2341 -- |
2196 -- Name: ort_pkey; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: | 2342 -- Name: ortszuordnung_pkey; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: |
2343 -- | |
2344 | |
2345 ALTER TABLE ONLY ortszuordnung | |
2346 ADD CONSTRAINT ortszuordnung_pkey PRIMARY KEY (id); | |
2347 | |
2348 | |
2349 -- | |
2350 -- Name: probe_pkey; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: | |
2351 -- | |
2352 | |
2353 ALTER TABLE ONLY probe | |
2354 ADD CONSTRAINT probe_pkey PRIMARY KEY (id); | |
2355 | |
2356 | |
2357 -- | |
2358 -- Name: status_protokoll_pkey; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: | |
2359 -- | |
2360 | |
2361 ALTER TABLE ONLY status_protokoll | |
2362 ADD CONSTRAINT status_protokoll_pkey PRIMARY KEY (id); | |
2363 | |
2364 | |
2365 -- | |
2366 -- Name: zusatz_wert_pkey; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: | |
2367 -- | |
2368 | |
2369 ALTER TABLE ONLY zusatz_wert | |
2370 ADD CONSTRAINT zusatz_wert_pkey PRIMARY KEY (id); | |
2371 | |
2372 | |
2373 -- | |
2374 -- Name: zusatz_wert_probe_id_pzs_id_key; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: | |
2375 -- | |
2376 | |
2377 ALTER TABLE ONLY zusatz_wert | |
2378 ADD CONSTRAINT zusatz_wert_probe_id_pzs_id_key UNIQUE (probe_id, pzs_id); | |
2379 | |
2380 | |
2381 SET search_path = land, pg_catalog; | |
2382 | |
2383 -- | |
2384 -- Name: kommentar_m_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2385 -- | |
2386 | |
2387 ALTER TABLE ONLY kommentar_m | |
2388 ADD CONSTRAINT kommentar_m_pkey PRIMARY KEY (id); | |
2389 | |
2390 | |
2391 -- | |
2392 -- Name: kommentar_p_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2393 -- | |
2394 | |
2395 ALTER TABLE ONLY kommentar_p | |
2396 ADD CONSTRAINT kommentar_p_pkey PRIMARY KEY (id); | |
2397 | |
2398 | |
2399 -- | |
2400 -- Name: messprogramm_mmt_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2401 -- | |
2402 | |
2403 ALTER TABLE ONLY messprogramm_mmt | |
2404 ADD CONSTRAINT messprogramm_mmt_pkey PRIMARY KEY (id); | |
2405 | |
2406 | |
2407 -- | |
2408 -- Name: messprogramm_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2409 -- | |
2410 | |
2411 ALTER TABLE ONLY messprogramm | |
2412 ADD CONSTRAINT messprogramm_pkey PRIMARY KEY (id); | |
2413 | |
2414 | |
2415 -- | |
2416 -- Name: messung_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2417 -- | |
2418 | |
2419 ALTER TABLE ONLY messung | |
2420 ADD CONSTRAINT messung_pkey PRIMARY KEY (id); | |
2421 | |
2422 | |
2423 -- | |
2424 -- Name: messung_translation_messungs_id_key; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2425 -- | |
2426 | |
2427 ALTER TABLE ONLY messung_translation | |
2428 ADD CONSTRAINT messung_translation_messungs_id_key UNIQUE (messungs_id); | |
2429 | |
2430 | |
2431 -- | |
2432 -- Name: messung_translation_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2433 -- | |
2434 | |
2435 ALTER TABLE ONLY messung_translation | |
2436 ADD CONSTRAINT messung_translation_pkey PRIMARY KEY (id); | |
2437 | |
2438 | |
2439 -- | |
2440 -- Name: messwert_messungs_id_messgroesse_id_key; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2441 -- | |
2442 | |
2443 ALTER TABLE ONLY messwert | |
2444 ADD CONSTRAINT messwert_messungs_id_messgroesse_id_key UNIQUE (messungs_id, messgroesse_id); | |
2445 | |
2446 | |
2447 -- | |
2448 -- Name: messwert_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2449 -- | |
2450 | |
2451 ALTER TABLE ONLY messwert | |
2452 ADD CONSTRAINT messwert_pkey PRIMARY KEY (id); | |
2453 | |
2454 | |
2455 -- | |
2456 -- Name: ortszuordnung_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2457 -- | |
2458 | |
2459 ALTER TABLE ONLY ortszuordnung | |
2460 ADD CONSTRAINT ortszuordnung_pkey PRIMARY KEY (id); | |
2461 | |
2462 | |
2463 -- | |
2464 -- Name: probe_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2465 -- | |
2466 | |
2467 ALTER TABLE ONLY probe | |
2468 ADD CONSTRAINT probe_pkey PRIMARY KEY (id); | |
2469 | |
2470 | |
2471 -- | |
2472 -- Name: probe_translation_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2473 -- | |
2474 | |
2475 ALTER TABLE ONLY probe_translation | |
2476 ADD CONSTRAINT probe_translation_pkey PRIMARY KEY (id); | |
2477 | |
2478 | |
2479 -- | |
2480 -- Name: probe_translation_probe_id_key; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2481 -- | |
2482 | |
2483 ALTER TABLE ONLY probe_translation | |
2484 ADD CONSTRAINT probe_translation_probe_id_key UNIQUE (probe_id); | |
2485 | |
2486 | |
2487 -- | |
2488 -- Name: status_protokoll_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2489 -- | |
2490 | |
2491 ALTER TABLE ONLY status_protokoll | |
2492 ADD CONSTRAINT status_protokoll_pkey PRIMARY KEY (id); | |
2493 | |
2494 | |
2495 -- | |
2496 -- Name: zusatz_wert_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2497 -- | |
2498 | |
2499 ALTER TABLE ONLY zusatz_wert | |
2500 ADD CONSTRAINT zusatz_wert_pkey PRIMARY KEY (id); | |
2501 | |
2502 | |
2503 -- | |
2504 -- Name: zusatz_wert_probe_id_pzs_id_key; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2505 -- | |
2506 | |
2507 ALTER TABLE ONLY zusatz_wert | |
2508 ADD CONSTRAINT zusatz_wert_probe_id_pzs_id_key UNIQUE (probe_id, pzs_id); | |
2509 | |
2510 | |
2511 SET search_path = stammdaten, pg_catalog; | |
2512 | |
2513 -- | |
2514 -- Name: auth_lst_umw_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2515 -- | |
2516 | |
2517 ALTER TABLE ONLY auth_lst_umw | |
2518 ADD CONSTRAINT auth_lst_umw_pkey PRIMARY KEY (id); | |
2519 | |
2520 | |
2521 -- | |
2522 -- Name: auth_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2523 -- | |
2524 | |
2525 ALTER TABLE ONLY auth | |
2526 ADD CONSTRAINT auth_pkey PRIMARY KEY (id); | |
2527 | |
2528 | |
2529 -- | |
2530 -- Name: auth_role_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2531 -- | |
2532 | |
2533 ALTER TABLE ONLY auth_funktion | |
2534 ADD CONSTRAINT auth_role_pkey PRIMARY KEY (id); | |
2535 | |
2536 | |
2537 -- | |
2538 -- Name: datenbasis_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2539 -- | |
2540 | |
2541 ALTER TABLE ONLY datenbasis | |
2542 ADD CONSTRAINT datenbasis_pkey PRIMARY KEY (id); | |
2543 | |
2544 | |
2545 -- | |
2546 -- Name: datensatz_erzeuger_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2547 -- | |
2548 | |
2549 ALTER TABLE ONLY datensatz_erzeuger | |
2550 ADD CONSTRAINT datensatz_erzeuger_pkey PRIMARY KEY (id); | |
2551 | |
2552 | |
2553 -- | |
2554 -- Name: de_vg_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2555 -- | |
2556 | |
2557 ALTER TABLE ONLY de_vg | |
2558 ADD CONSTRAINT de_vg_pkey PRIMARY KEY (id); | |
2559 | |
2560 | |
2561 -- | |
2562 -- Name: deskriptor_umwelt_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2563 -- | |
2564 | |
2565 ALTER TABLE ONLY deskriptor_umwelt | |
2566 ADD CONSTRAINT deskriptor_umwelt_pkey PRIMARY KEY (id); | |
2567 | |
2568 | |
2569 -- | |
2570 -- Name: koordinaten_art_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2571 -- | |
2572 | |
2573 ALTER TABLE ONLY koordinaten_art | |
2574 ADD CONSTRAINT koordinaten_art_pkey PRIMARY KEY (id); | |
2575 | |
2576 | |
2577 -- | |
2578 -- Name: mess_einheit_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2579 -- | |
2580 | |
2581 ALTER TABLE ONLY mess_einheit | |
2582 ADD CONSTRAINT mess_einheit_pkey PRIMARY KEY (id); | |
2583 | |
2584 | |
2585 -- | |
2586 -- Name: mess_methode_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2587 -- | |
2588 | |
2589 ALTER TABLE ONLY mess_methode | |
2590 ADD CONSTRAINT mess_methode_pkey PRIMARY KEY (id); | |
2591 | |
2592 | |
2593 -- | |
2594 -- Name: mess_stelle_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2595 -- | |
2596 | |
2597 ALTER TABLE ONLY mess_stelle | |
2598 ADD CONSTRAINT mess_stelle_pkey PRIMARY KEY (id); | |
2599 | |
2600 | |
2601 -- | |
2602 -- Name: messgroesse_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2603 -- | |
2604 | |
2605 ALTER TABLE ONLY messgroesse | |
2606 ADD CONSTRAINT messgroesse_pkey PRIMARY KEY (id); | |
2607 | |
2608 | |
2609 -- | |
2610 -- Name: messgroessen_gruppe_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2611 -- | |
2612 | |
2613 ALTER TABLE ONLY messgroessen_gruppe | |
2614 ADD CONSTRAINT messgroessen_gruppe_pkey PRIMARY KEY (id); | |
2615 | |
2616 | |
2617 -- | |
2618 -- Name: messprogramm_kategorie_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2619 -- | |
2620 | |
2621 ALTER TABLE ONLY messprogramm_kategorie | |
2622 ADD CONSTRAINT messprogramm_kategorie_pkey PRIMARY KEY (id); | |
2623 | |
2624 | |
2625 -- | |
2626 -- Name: mg_grp_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2627 -- | |
2628 | |
2629 ALTER TABLE ONLY mg_grp | |
2630 ADD CONSTRAINT mg_grp_pkey PRIMARY KEY (messgroessengruppe_id, messgroesse_id); | |
2631 | |
2632 | |
2633 -- | |
2634 -- Name: mmt_messgroesse_grp_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2635 -- | |
2636 | |
2637 ALTER TABLE ONLY mmt_messgroesse_grp | |
2638 ADD CONSTRAINT mmt_messgroesse_grp_pkey PRIMARY KEY (messgroessengruppe_id, mmt_id); | |
2639 | |
2640 | |
2641 -- | |
2642 -- Name: netz_betreiber_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2643 -- | |
2644 | |
2645 ALTER TABLE ONLY netz_betreiber | |
2646 ADD CONSTRAINT netz_betreiber_pkey PRIMARY KEY (id); | |
2647 | |
2648 | |
2649 -- | |
2650 -- Name: ort_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2197 -- | 2651 -- |
2198 | 2652 |
2199 ALTER TABLE ONLY ort | 2653 ALTER TABLE ONLY ort |
2200 ADD CONSTRAINT ort_pkey PRIMARY KEY (id); | 2654 ADD CONSTRAINT ort_pkey PRIMARY KEY (id); |
2201 | 2655 |
2202 | 2656 |
2203 -- | 2657 -- |
2204 -- Name: probe_pkey; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: | 2658 -- Name: ort_typ_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: |
2205 -- | 2659 -- |
2206 | 2660 |
2207 ALTER TABLE ONLY probe | 2661 ALTER TABLE ONLY ort_typ |
2208 ADD CONSTRAINT probe_pkey PRIMARY KEY (id); | 2662 ADD CONSTRAINT ort_typ_pkey PRIMARY KEY (id); |
2209 | 2663 |
2210 | 2664 |
2211 -- | 2665 -- |
2212 -- Name: status_protokoll_pkey; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: | 2666 -- Name: ortszuordnung_typ_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: |
2213 -- | 2667 -- |
2214 | 2668 |
2215 ALTER TABLE ONLY status_protokoll | 2669 ALTER TABLE ONLY ortszuordnung_typ |
2216 ADD CONSTRAINT status_protokoll_pkey PRIMARY KEY (id); | 2670 ADD CONSTRAINT ortszuordnung_typ_pkey PRIMARY KEY (id); |
2217 | |
2218 | |
2219 -- | |
2220 -- Name: zusatz_wert_pkey; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: | |
2221 -- | |
2222 | |
2223 ALTER TABLE ONLY zusatz_wert | |
2224 ADD CONSTRAINT zusatz_wert_pkey PRIMARY KEY (id); | |
2225 | |
2226 | |
2227 -- | |
2228 -- Name: zusatz_wert_probe_id_pzs_id_key; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: | |
2229 -- | |
2230 | |
2231 ALTER TABLE ONLY zusatz_wert | |
2232 ADD CONSTRAINT zusatz_wert_probe_id_pzs_id_key UNIQUE (probe_id, pzs_id); | |
2233 | |
2234 | |
2235 SET search_path = land, pg_catalog; | |
2236 | |
2237 -- | |
2238 -- Name: kommentar_m_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2239 -- | |
2240 | |
2241 ALTER TABLE ONLY kommentar_m | |
2242 ADD CONSTRAINT kommentar_m_pkey PRIMARY KEY (id); | |
2243 | |
2244 | |
2245 -- | |
2246 -- Name: kommentar_p_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2247 -- | |
2248 | |
2249 ALTER TABLE ONLY kommentar_p | |
2250 ADD CONSTRAINT kommentar_p_pkey PRIMARY KEY (id); | |
2251 | |
2252 | |
2253 -- | |
2254 -- Name: messprogramm_mmt_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2255 -- | |
2256 | |
2257 ALTER TABLE ONLY messprogramm_mmt | |
2258 ADD CONSTRAINT messprogramm_mmt_pkey PRIMARY KEY (id); | |
2259 | |
2260 | |
2261 -- | |
2262 -- Name: messprogramm_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2263 -- | |
2264 | |
2265 ALTER TABLE ONLY messprogramm | |
2266 ADD CONSTRAINT messprogramm_pkey PRIMARY KEY (id); | |
2267 | |
2268 | |
2269 -- | |
2270 -- Name: messung_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2271 -- | |
2272 | |
2273 ALTER TABLE ONLY messung | |
2274 ADD CONSTRAINT messung_pkey PRIMARY KEY (id); | |
2275 | |
2276 | |
2277 -- | |
2278 -- Name: messung_translation_messungs_id_key; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2279 -- | |
2280 | |
2281 ALTER TABLE ONLY messung_translation | |
2282 ADD CONSTRAINT messung_translation_messungs_id_key UNIQUE (messungs_id); | |
2283 | |
2284 | |
2285 -- | |
2286 -- Name: messung_translation_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2287 -- | |
2288 | |
2289 ALTER TABLE ONLY messung_translation | |
2290 ADD CONSTRAINT messung_translation_pkey PRIMARY KEY (id); | |
2291 | |
2292 | |
2293 -- | |
2294 -- Name: messwert_messungs_id_messgroesse_id_key; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2295 -- | |
2296 | |
2297 ALTER TABLE ONLY messwert | |
2298 ADD CONSTRAINT messwert_messungs_id_messgroesse_id_key UNIQUE (messungs_id, messgroesse_id); | |
2299 | |
2300 | |
2301 -- | |
2302 -- Name: messwert_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2303 -- | |
2304 | |
2305 ALTER TABLE ONLY messwert | |
2306 ADD CONSTRAINT messwert_pkey PRIMARY KEY (id); | |
2307 | |
2308 | |
2309 -- | |
2310 -- Name: ort_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2311 -- | |
2312 | |
2313 ALTER TABLE ONLY ort | |
2314 ADD CONSTRAINT ort_pkey PRIMARY KEY (id); | |
2315 | |
2316 | |
2317 -- | |
2318 -- Name: probe_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2319 -- | |
2320 | |
2321 ALTER TABLE ONLY probe | |
2322 ADD CONSTRAINT probe_pkey PRIMARY KEY (id); | |
2323 | |
2324 | |
2325 -- | |
2326 -- Name: probe_translation_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2327 -- | |
2328 | |
2329 ALTER TABLE ONLY probe_translation | |
2330 ADD CONSTRAINT probe_translation_pkey PRIMARY KEY (id); | |
2331 | |
2332 | |
2333 -- | |
2334 -- Name: probe_translation_probe_id_key; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2335 -- | |
2336 | |
2337 ALTER TABLE ONLY probe_translation | |
2338 ADD CONSTRAINT probe_translation_probe_id_key UNIQUE (probe_id); | |
2339 | |
2340 | |
2341 -- | |
2342 -- Name: status_protokoll_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2343 -- | |
2344 | |
2345 ALTER TABLE ONLY status_protokoll | |
2346 ADD CONSTRAINT status_protokoll_pkey PRIMARY KEY (id); | |
2347 | |
2348 | |
2349 -- | |
2350 -- Name: zusatz_wert_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2351 -- | |
2352 | |
2353 ALTER TABLE ONLY zusatz_wert | |
2354 ADD CONSTRAINT zusatz_wert_pkey PRIMARY KEY (id); | |
2355 | |
2356 | |
2357 -- | |
2358 -- Name: zusatz_wert_probe_id_pzs_id_key; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
2359 -- | |
2360 | |
2361 ALTER TABLE ONLY zusatz_wert | |
2362 ADD CONSTRAINT zusatz_wert_probe_id_pzs_id_key UNIQUE (probe_id, pzs_id); | |
2363 | |
2364 | |
2365 SET search_path = stammdaten, pg_catalog; | |
2366 | |
2367 -- | |
2368 -- Name: auth_lst_umw_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2369 -- | |
2370 | |
2371 ALTER TABLE ONLY auth_lst_umw | |
2372 ADD CONSTRAINT auth_lst_umw_pkey PRIMARY KEY (id); | |
2373 | |
2374 | |
2375 -- | |
2376 -- Name: auth_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2377 -- | |
2378 | |
2379 ALTER TABLE ONLY auth | |
2380 ADD CONSTRAINT auth_pkey PRIMARY KEY (id); | |
2381 | |
2382 | |
2383 -- | |
2384 -- Name: auth_role_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2385 -- | |
2386 | |
2387 ALTER TABLE ONLY auth_funktion | |
2388 ADD CONSTRAINT auth_role_pkey PRIMARY KEY (id); | |
2389 | |
2390 | |
2391 -- | |
2392 -- Name: datenbasis_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2393 -- | |
2394 | |
2395 ALTER TABLE ONLY datenbasis | |
2396 ADD CONSTRAINT datenbasis_pkey PRIMARY KEY (id); | |
2397 | |
2398 | |
2399 -- | |
2400 -- Name: de_vg_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2401 -- | |
2402 | |
2403 ALTER TABLE ONLY de_vg | |
2404 ADD CONSTRAINT de_vg_pkey PRIMARY KEY (id); | |
2405 | |
2406 | |
2407 -- | |
2408 -- Name: deskriptor_umwelt_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2409 -- | |
2410 | |
2411 ALTER TABLE ONLY deskriptor_umwelt | |
2412 ADD CONSTRAINT deskriptor_umwelt_pkey PRIMARY KEY (id); | |
2413 | |
2414 | |
2415 -- | |
2416 -- Name: koordinaten_art_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2417 -- | |
2418 | |
2419 ALTER TABLE ONLY koordinaten_art | |
2420 ADD CONSTRAINT koordinaten_art_pkey PRIMARY KEY (id); | |
2421 | |
2422 | |
2423 -- | |
2424 -- Name: mess_einheit_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2425 -- | |
2426 | |
2427 ALTER TABLE ONLY mess_einheit | |
2428 ADD CONSTRAINT mess_einheit_pkey PRIMARY KEY (id); | |
2429 | |
2430 | |
2431 -- | |
2432 -- Name: mess_methode_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2433 -- | |
2434 | |
2435 ALTER TABLE ONLY mess_methode | |
2436 ADD CONSTRAINT mess_methode_pkey PRIMARY KEY (id); | |
2437 | |
2438 | |
2439 -- | |
2440 -- Name: mess_stelle_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2441 -- | |
2442 | |
2443 ALTER TABLE ONLY mess_stelle | |
2444 ADD CONSTRAINT mess_stelle_pkey PRIMARY KEY (id); | |
2445 | |
2446 | |
2447 -- | |
2448 -- Name: messgroesse_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2449 -- | |
2450 | |
2451 ALTER TABLE ONLY messgroesse | |
2452 ADD CONSTRAINT messgroesse_pkey PRIMARY KEY (id); | |
2453 | |
2454 | |
2455 -- | |
2456 -- Name: messgroessen_gruppe_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2457 -- | |
2458 | |
2459 ALTER TABLE ONLY messgroessen_gruppe | |
2460 ADD CONSTRAINT messgroessen_gruppe_pkey PRIMARY KEY (id); | |
2461 | |
2462 | |
2463 -- | |
2464 -- Name: mg_grp_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2465 -- | |
2466 | |
2467 ALTER TABLE ONLY mg_grp | |
2468 ADD CONSTRAINT mg_grp_pkey PRIMARY KEY (messgroessengruppe_id, messgroesse_id); | |
2469 | |
2470 | |
2471 -- | |
2472 -- Name: mmt_messgroesse_grp_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2473 -- | |
2474 | |
2475 ALTER TABLE ONLY mmt_messgroesse_grp | |
2476 ADD CONSTRAINT mmt_messgroesse_grp_pkey PRIMARY KEY (messgroessengruppe_id, mmt_id); | |
2477 | |
2478 | |
2479 -- | |
2480 -- Name: netz_betreiber_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2481 -- | |
2482 | |
2483 ALTER TABLE ONLY netz_betreiber | |
2484 ADD CONSTRAINT netz_betreiber_pkey PRIMARY KEY (id); | |
2485 | |
2486 | |
2487 -- | |
2488 -- Name: ort_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2489 -- | |
2490 | |
2491 ALTER TABLE ONLY ort | |
2492 ADD CONSTRAINT ort_pkey PRIMARY KEY (id); | |
2493 | 2671 |
2494 | 2672 |
2495 -- | 2673 -- |
2496 -- Name: pflicht_messgroesse_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | 2674 -- Name: pflicht_messgroesse_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: |
2497 -- | 2675 -- |
2531 ALTER TABLE ONLY probenart | 2709 ALTER TABLE ONLY probenart |
2532 ADD CONSTRAINT probenart_pkey PRIMARY KEY (id); | 2710 ADD CONSTRAINT probenart_pkey PRIMARY KEY (id); |
2533 | 2711 |
2534 | 2712 |
2535 -- | 2713 -- |
2714 -- Name: probenehmer_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | |
2715 -- | |
2716 | |
2717 ALTER TABLE ONLY probenehmer | |
2718 ADD CONSTRAINT probenehmer_pkey PRIMARY KEY (id); | |
2719 | |
2720 | |
2721 -- | |
2536 -- Name: staat_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: | 2722 -- Name: staat_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: |
2537 -- | 2723 -- |
2538 | 2724 |
2539 ALTER TABLE ONLY staat | 2725 ALTER TABLE ONLY staat |
2540 ADD CONSTRAINT staat_pkey PRIMARY KEY (id); | 2726 ADD CONSTRAINT staat_pkey PRIMARY KEY (id); |
2692 | 2878 |
2693 -- | 2879 -- |
2694 -- Name: tree_timestamp_ort; Type: TRIGGER; Schema: land; Owner: - | 2880 -- Name: tree_timestamp_ort; Type: TRIGGER; Schema: land; Owner: - |
2695 -- | 2881 -- |
2696 | 2882 |
2697 CREATE TRIGGER tree_timestamp_ort BEFORE UPDATE ON ort FOR EACH ROW EXECUTE PROCEDURE update_time_ort(); | 2883 CREATE TRIGGER tree_timestamp_ort BEFORE UPDATE ON ortszuordnung FOR EACH ROW EXECUTE PROCEDURE update_time_ort(); |
2698 | 2884 |
2699 | 2885 |
2700 -- | 2886 -- |
2701 -- Name: tree_timestamp_probe; Type: TRIGGER; Schema: land; Owner: - | 2887 -- Name: tree_timestamp_probe; Type: TRIGGER; Schema: land; Owner: - |
2702 -- | 2888 -- |
2776 ALTER TABLE ONLY messwert | 2962 ALTER TABLE ONLY messwert |
2777 ADD CONSTRAINT messwert_messungs_id_fkey FOREIGN KEY (messungs_id) REFERENCES messung(id); | 2963 ADD CONSTRAINT messwert_messungs_id_fkey FOREIGN KEY (messungs_id) REFERENCES messung(id); |
2778 | 2964 |
2779 | 2965 |
2780 -- | 2966 -- |
2781 -- Name: ort_ort_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - | 2967 -- Name: ortszuordnung_ort_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - |
2782 -- | 2968 -- |
2783 | 2969 |
2784 ALTER TABLE ONLY ort | 2970 ALTER TABLE ONLY ortszuordnung |
2785 ADD CONSTRAINT ort_ort_id_fkey FOREIGN KEY (ort_id) REFERENCES stammdaten.ort(id); | 2971 ADD CONSTRAINT ortszuordnung_ort_id_fkey FOREIGN KEY (ort_id) REFERENCES stammdaten.ort(id); |
2786 | 2972 |
2787 | 2973 |
2788 -- | 2974 -- |
2789 -- Name: ort_probe_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - | 2975 -- Name: ortszuordnung_ortszuordnung_typ_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - |
2790 -- | 2976 -- |
2791 | 2977 |
2792 ALTER TABLE ONLY ort | 2978 ALTER TABLE ONLY ortszuordnung |
2793 ADD CONSTRAINT ort_probe_id_fkey FOREIGN KEY (probe_id) REFERENCES probe(id); | 2979 ADD CONSTRAINT ortszuordnung_ortszuordnung_typ_fkey FOREIGN KEY (ortszuordnung_typ) REFERENCES stammdaten.ortszuordnung_typ(id); |
2980 | |
2981 | |
2982 -- | |
2983 -- Name: ortszuordnung_probe_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - | |
2984 -- | |
2985 | |
2986 ALTER TABLE ONLY ortszuordnung | |
2987 ADD CONSTRAINT ortszuordnung_probe_id_fkey FOREIGN KEY (probe_id) REFERENCES probe(id); | |
2794 | 2988 |
2795 | 2989 |
2796 -- | 2990 -- |
2797 -- Name: probe_datenbasis_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - | 2991 -- Name: probe_datenbasis_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - |
2798 -- | 2992 -- |
3010 ALTER TABLE ONLY messwert | 3204 ALTER TABLE ONLY messwert |
3011 ADD CONSTRAINT messwert_messungs_id_fkey FOREIGN KEY (messungs_id) REFERENCES messung(id) ON DELETE CASCADE; | 3205 ADD CONSTRAINT messwert_messungs_id_fkey FOREIGN KEY (messungs_id) REFERENCES messung(id) ON DELETE CASCADE; |
3012 | 3206 |
3013 | 3207 |
3014 -- | 3208 -- |
3015 -- Name: ort_ort_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - | 3209 -- Name: ortszuordnung_ort_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - |
3016 -- | 3210 -- |
3017 | 3211 |
3018 ALTER TABLE ONLY ort | 3212 ALTER TABLE ONLY ortszuordnung |
3019 ADD CONSTRAINT ort_ort_id_fkey FOREIGN KEY (ort_id) REFERENCES stammdaten.ort(id); | 3213 ADD CONSTRAINT ortszuordnung_ort_id_fkey FOREIGN KEY (ort_id) REFERENCES stammdaten.ort(id); |
3020 | 3214 |
3021 | 3215 |
3022 -- | 3216 -- |
3023 -- Name: ort_probe_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - | 3217 -- Name: ortszuordnung_ortszuordnung_typ_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - |
3024 -- | 3218 -- |
3025 | 3219 |
3026 ALTER TABLE ONLY ort | 3220 ALTER TABLE ONLY ortszuordnung |
3027 ADD CONSTRAINT ort_probe_id_fkey FOREIGN KEY (probe_id) REFERENCES probe(id) ON DELETE CASCADE; | 3221 ADD CONSTRAINT ortszuordnung_ortszuordnung_typ_fkey FOREIGN KEY (ortszuordnung_typ) REFERENCES stammdaten.ortszuordnung_typ(id); |
3222 | |
3223 | |
3224 -- | |
3225 -- Name: ortszuordnung_probe_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - | |
3226 -- | |
3227 | |
3228 ALTER TABLE ONLY ortszuordnung | |
3229 ADD CONSTRAINT ortszuordnung_probe_id_fkey FOREIGN KEY (probe_id) REFERENCES probe(id) ON DELETE CASCADE; | |
3028 | 3230 |
3029 | 3231 |
3030 -- | 3232 -- |
3031 -- Name: probe_datenbasis_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - | 3233 -- Name: probe_datenbasis_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - |
3032 -- | 3234 -- |
3148 ALTER TABLE ONLY auth | 3350 ALTER TABLE ONLY auth |
3149 ADD CONSTRAINT auth_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES netz_betreiber(id); | 3351 ADD CONSTRAINT auth_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES netz_betreiber(id); |
3150 | 3352 |
3151 | 3353 |
3152 -- | 3354 -- |
3355 -- Name: datensatz_erzeuger_mst_id_fkey1; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - | |
3356 -- | |
3357 | |
3358 ALTER TABLE ONLY datensatz_erzeuger | |
3359 ADD CONSTRAINT datensatz_erzeuger_mst_id_fkey1 FOREIGN KEY (mst_id) REFERENCES mess_stelle(id); | |
3360 | |
3361 | |
3362 -- | |
3363 -- Name: datensatz_erzeuger_netzbetreiber_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - | |
3364 -- | |
3365 | |
3366 ALTER TABLE ONLY datensatz_erzeuger | |
3367 ADD CONSTRAINT datensatz_erzeuger_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES netz_betreiber(id); | |
3368 | |
3369 | |
3370 -- | |
3153 -- Name: fk_deskriptoren_vorgaenger; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - | 3371 -- Name: fk_deskriptoren_vorgaenger; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - |
3154 -- | 3372 -- |
3155 | 3373 |
3156 ALTER TABLE ONLY deskriptoren | 3374 ALTER TABLE ONLY deskriptoren |
3157 ADD CONSTRAINT fk_deskriptoren_vorgaenger FOREIGN KEY (vorgaenger) REFERENCES deskriptoren(id); | 3375 ADD CONSTRAINT fk_deskriptoren_vorgaenger FOREIGN KEY (vorgaenger) REFERENCES deskriptoren(id); |
3158 | 3376 |
3159 | 3377 |
3160 -- | 3378 -- |
3379 -- Name: messprogramm_kategorie_netzbetreiber_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - | |
3380 -- | |
3381 | |
3382 ALTER TABLE ONLY messprogramm_kategorie | |
3383 ADD CONSTRAINT messprogramm_kategorie_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES netz_betreiber(id); | |
3384 | |
3385 | |
3386 -- | |
3387 -- Name: ort_anlage_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - | |
3388 -- | |
3389 | |
3390 ALTER TABLE ONLY ort | |
3391 ADD CONSTRAINT ort_anlage_fkey FOREIGN KEY (anlage_id) REFERENCES ort(id); | |
3392 | |
3393 | |
3394 -- | |
3161 -- Name: ort_gem_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - | 3395 -- Name: ort_gem_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - |
3162 -- | 3396 -- |
3163 | 3397 |
3164 ALTER TABLE ONLY ort | 3398 ALTER TABLE ONLY ort |
3165 ADD CONSTRAINT ort_gem_id_fkey FOREIGN KEY (gem_id) REFERENCES verwaltungseinheit(id); | 3399 ADD CONSTRAINT ort_gem_id_fkey FOREIGN KEY (gem_id) REFERENCES verwaltungseinheit(id); |
3180 ALTER TABLE ONLY ort | 3414 ALTER TABLE ONLY ort |
3181 ADD CONSTRAINT ort_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES netz_betreiber(id); | 3415 ADD CONSTRAINT ort_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES netz_betreiber(id); |
3182 | 3416 |
3183 | 3417 |
3184 -- | 3418 -- |
3419 -- Name: ort_ort_typ_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - | |
3420 -- | |
3421 | |
3422 ALTER TABLE ONLY ort | |
3423 ADD CONSTRAINT ort_ort_typ_fkey FOREIGN KEY (ort_typ) REFERENCES ort_typ(id); | |
3424 | |
3425 | |
3426 -- | |
3427 -- Name: ort_oz_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - | |
3428 -- | |
3429 | |
3430 ALTER TABLE ONLY ort | |
3431 ADD CONSTRAINT ort_oz_fkey FOREIGN KEY (oz_id) REFERENCES ort(id); | |
3432 | |
3433 | |
3434 -- | |
3185 -- Name: ort_staat_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - | 3435 -- Name: ort_staat_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - |
3186 -- | 3436 -- |
3187 | 3437 |
3188 ALTER TABLE ONLY ort | 3438 ALTER TABLE ONLY ort |
3189 ADD CONSTRAINT ort_staat_id_fkey FOREIGN KEY (staat_id) REFERENCES staat(id); | 3439 ADD CONSTRAINT ort_staat_id_fkey FOREIGN KEY (staat_id) REFERENCES staat(id); |
3217 -- Name: proben_zusatz_meh_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - | 3467 -- Name: proben_zusatz_meh_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - |
3218 -- | 3468 -- |
3219 | 3469 |
3220 ALTER TABLE ONLY proben_zusatz | 3470 ALTER TABLE ONLY proben_zusatz |
3221 ADD CONSTRAINT proben_zusatz_meh_id_fkey FOREIGN KEY (meh_id) REFERENCES mess_einheit(id); | 3471 ADD CONSTRAINT proben_zusatz_meh_id_fkey FOREIGN KEY (meh_id) REFERENCES mess_einheit(id); |
3472 | |
3473 | |
3474 -- | |
3475 -- Name: probenehmer_netzbetreiber_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - | |
3476 -- | |
3477 | |
3478 ALTER TABLE ONLY probenehmer | |
3479 ADD CONSTRAINT probenehmer_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES netz_betreiber(id); | |
3222 | 3480 |
3223 | 3481 |
3224 -- | 3482 -- |
3225 -- Name: staat_kda_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - | 3483 -- Name: staat_kda_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - |
3226 -- | 3484 -- |