Mercurial > lada > lada-server
comparison db_schema/lada_schema.sql @ 907:ca1af8bbfe1f
merged.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 06 Apr 2016 12:20:12 +0200 |
parents | 56c9fb1d37c8 |
children | 54e83373bfae |
comparison
equal
deleted
inserted
replaced
906:22052e4808c0 | 907:ca1af8bbfe1f |
---|---|
359 -- | 359 -- |
360 -- Name: probe; Type: TABLE; Schema: bund; Owner: -; Tablespace: | 360 -- Name: probe; Type: TABLE; Schema: bund; Owner: -; Tablespace: |
361 -- | 361 -- |
362 | 362 |
363 CREATE TABLE probe ( | 363 CREATE TABLE probe ( |
364 id integer DEFAULT nextval('probe_id_seq'::regclass) NOT NULL, | 364 id integer PRIMARY KEY DEFAULT nextval('probe_id_seq'::regclass), |
365 test boolean DEFAULT false NOT NULL, | 365 test boolean DEFAULT false NOT NULL, |
366 netzbetreiber_id character varying(2), | 366 netzbetreiber_id character varying(2) REFERENCES stammdaten.netz_betreiber, |
367 mst_id character varying(5), | 367 mst_id character varying(5) NOT NULL |
368 labor_mst_id character varying(5), | 368 REFERENCES stammdaten.mess_stelle, |
369 labor_mst_id character varying(5) NOT NULL | |
370 REFERENCES stammdaten.mess_stelle, | |
369 hauptproben_nr character varying(20), | 371 hauptproben_nr character varying(20), |
370 datenbasis_id smallint, | 372 datenbasis_id smallint REFERENCES stammdaten.datenbasis, |
371 ba_id character varying(1), | 373 ba_id character varying(1), |
372 probenart_id smallint NOT NULL, | 374 probenart_id smallint NOT NULL REFERENCES stammdaten.probenart, |
373 media_desk character varying(100), | 375 media_desk character varying(100), |
374 media character varying(100), | 376 media character varying(100), |
375 umw_id character varying(3), | 377 umw_id character varying(3) REFERENCES stammdaten.umwelt, |
376 probeentnahme_beginn timestamp with time zone, | 378 probeentnahme_beginn timestamp with time zone, |
377 probeentnahme_ende timestamp with time zone, | 379 probeentnahme_ende timestamp with time zone, |
378 mittelungsdauer bigint, | 380 mittelungsdauer bigint, |
379 letzte_aenderung timestamp without time zone DEFAULT now() | 381 letzte_aenderung timestamp without time zone DEFAULT now() |
380 ); | 382 ); |
381 | |
382 | 383 |
383 -- | 384 -- |
384 -- Name: COLUMN probe.id; Type: COMMENT; Schema: bund; Owner: - | 385 -- Name: COLUMN probe.id; Type: COMMENT; Schema: bund; Owner: - |
385 -- | 386 -- |
386 | 387 |
520 ) | 521 ) |
521 INHERITS (bund.kommentar_p); | 522 INHERITS (bund.kommentar_p); |
522 | 523 |
523 | 524 |
524 -- | 525 -- |
526 -- Name: messprogramm_id_seq; Type: SEQUENCE; Schema: land; Owner: - | |
527 -- | |
528 | |
529 CREATE SEQUENCE messprogramm_id_seq | |
530 START WITH 1 | |
531 INCREMENT BY 1 | |
532 NO MINVALUE | |
533 NO MAXVALUE | |
534 CACHE 1; | |
535 | |
536 | |
537 -- | |
525 -- Name: messprogramm; Type: TABLE; Schema: land; Owner: -; Tablespace: | 538 -- Name: messprogramm; Type: TABLE; Schema: land; Owner: -; Tablespace: |
526 -- | 539 -- |
527 | 540 |
528 CREATE TABLE messprogramm ( | 541 CREATE TABLE messprogramm ( |
529 id integer NOT NULL, | 542 id integer PRIMARY KEY DEFAULT nextval('messprogramm_id_seq'::regclass), |
530 name character varying(256), | 543 name character varying(256), |
531 test boolean DEFAULT false NOT NULL, | 544 test boolean DEFAULT false NOT NULL, |
532 netzbetreiber_id character varying(2) NOT NULL, | 545 netzbetreiber_id character varying(2) NOT NULL |
533 mst_id character varying(5) NOT NULL, | 546 REFERENCES stammdaten.netz_betreiber, |
534 labor_mst_id character varying(5), | 547 mst_id character varying(5) NOT NULL REFERENCES stammdaten.mess_stelle, |
535 datenbasis_id integer NOT NULL, | 548 labor_mst_id character varying(5) NOT NULL |
549 REFERENCES stammdaten.mess_stelle, | |
550 datenbasis_id integer NOT NULL REFERENCES stammdaten.datenbasis, | |
536 ba_id character varying(1), | 551 ba_id character varying(1), |
537 gem_id character varying(8), | 552 gem_id character varying(8), |
538 ort_id integer, | 553 ort_id integer REFERENCES stammdaten.ort, |
539 media_desk character varying(100), | 554 media_desk character varying(100), |
540 umw_id character varying(3), | 555 umw_id character varying(3) REFERENCES stammdaten.umwelt, |
541 probenart_id integer NOT NULL, | 556 probenart_id integer NOT NULL REFERENCES stammdaten.probenart, |
542 probenintervall character varying(2), | 557 probenintervall character varying(2), |
543 teilintervall_von integer, | 558 teilintervall_von integer, |
544 teilintervall_bis integer, | 559 teilintervall_bis integer, |
545 intervall_offset integer, | 560 intervall_offset integer, |
546 gueltig_von integer, | 561 gueltig_von integer, |
548 probe_nehmer_id integer, | 563 probe_nehmer_id integer, |
549 probe_kommentar character varying(80), | 564 probe_kommentar character varying(80), |
550 letzte_aenderung timestamp without time zone DEFAULT now() NOT NULL | 565 letzte_aenderung timestamp without time zone DEFAULT now() NOT NULL |
551 ); | 566 ); |
552 | 567 |
568 -- | |
569 -- Name: messprogramm_id_seq; Type: SEQUENCE OWNED BY; Schema: land; Owner: - | |
570 -- | |
571 | |
572 ALTER SEQUENCE messprogramm_id_seq OWNED BY messprogramm.id; | |
573 | |
553 | 574 |
554 -- | 575 -- |
555 -- Name: COLUMN messprogramm.media_desk; Type: COMMENT; Schema: land; Owner: - | 576 -- Name: COLUMN messprogramm.media_desk; Type: COMMENT; Schema: land; Owner: - |
556 -- | 577 -- |
557 | 578 |
558 COMMENT ON COLUMN messprogramm.media_desk IS 'dekodierte Medienbezeichnung (aus media_desk abgeleitet)'; | 579 COMMENT ON COLUMN messprogramm.media_desk IS 'dekodierte Medienbezeichnung (aus media_desk abgeleitet)'; |
559 | |
560 | |
561 -- | |
562 -- Name: messprogramm_id_seq; Type: SEQUENCE; Schema: land; Owner: - | |
563 -- | |
564 | |
565 CREATE SEQUENCE messprogramm_id_seq | |
566 START WITH 1 | |
567 INCREMENT BY 1 | |
568 NO MINVALUE | |
569 NO MAXVALUE | |
570 CACHE 1; | |
571 | |
572 | |
573 -- | |
574 -- Name: messprogramm_id_seq; Type: SEQUENCE OWNED BY; Schema: land; Owner: - | |
575 -- | |
576 | |
577 ALTER SEQUENCE messprogramm_id_seq OWNED BY messprogramm.id; | |
578 | 580 |
579 | 581 |
580 -- | 582 -- |
581 -- Name: messprogramm_mmt; Type: TABLE; Schema: land; Owner: -; Tablespace: | 583 -- Name: messprogramm_mmt; Type: TABLE; Schema: land; Owner: -; Tablespace: |
582 -- | 584 -- |
684 solldatum_ende timestamp without time zone, | 686 solldatum_ende timestamp without time zone, |
685 tree_modified timestamp without time zone DEFAULT now() | 687 tree_modified timestamp without time zone DEFAULT now() |
686 ) | 688 ) |
687 INHERITS (bund.probe); | 689 INHERITS (bund.probe); |
688 | 690 |
691 ALTER TABLE ONLY probe | |
692 ADD CONSTRAINT probe_pkey PRIMARY KEY (id); | |
693 | |
694 ALTER TABLE ONLY probe | |
695 ADD CONSTRAINT probe_datenbasis_id_fkey | |
696 FOREIGN KEY (datenbasis_id) REFERENCES stammdaten.datenbasis(id); | |
697 | |
698 ALTER TABLE ONLY probe | |
699 ADD CONSTRAINT probe_mst_id_fkey | |
700 FOREIGN KEY (mst_id) REFERENCES stammdaten.mess_stelle(id); | |
701 | |
702 ALTER TABLE ONLY probe | |
703 ADD CONSTRAINT probe_labor_mst_id_fkey | |
704 FOREIGN KEY (labor_mst_id) REFERENCES stammdaten.mess_stelle(id); | |
705 | |
706 ALTER TABLE ONLY probe | |
707 ADD CONSTRAINT probe_netzbetreiber_id_fkey | |
708 FOREIGN KEY (netzbetreiber_id) REFERENCES stammdaten.netz_betreiber(id); | |
709 | |
710 ALTER TABLE ONLY probe | |
711 ADD CONSTRAINT probe_probenart_id_fkey | |
712 FOREIGN KEY (probenart_id) REFERENCES stammdaten.probenart(id); | |
713 | |
714 ALTER TABLE ONLY probe | |
715 ADD CONSTRAINT probe_umw_id_fkey | |
716 FOREIGN KEY (umw_id) REFERENCES stammdaten.umwelt(id); | |
717 | |
689 | 718 |
690 -- | 719 -- |
691 -- Name: probe_translation; Type: TABLE; Schema: land; Owner: -; Tablespace: | 720 -- Name: probe_translation; Type: TABLE; Schema: land; Owner: -; Tablespace: |
692 -- | 721 -- |
693 | 722 |
819 | 848 |
820 -- | 849 -- |
821 -- Name: id; Type: DEFAULT; Schema: land; Owner: - | 850 -- Name: id; Type: DEFAULT; Schema: land; Owner: - |
822 -- | 851 -- |
823 | 852 |
824 ALTER TABLE ONLY messprogramm ALTER COLUMN id SET DEFAULT nextval('messprogramm_id_seq'::regclass); | 853 ALTER TABLE ONLY messprogramm_mmt ALTER COLUMN id SET DEFAULT nextval('messprogramm_mmt_id_seq'::regclass); |
825 | 854 |
826 | 855 |
827 -- | 856 -- |
828 -- Name: id; Type: DEFAULT; Schema: land; Owner: - | 857 -- Name: id; Type: DEFAULT; Schema: land; Owner: - |
829 -- | 858 -- |
830 | 859 |
831 ALTER TABLE ONLY messprogramm_mmt ALTER COLUMN id SET DEFAULT nextval('messprogramm_mmt_id_seq'::regclass); | 860 ALTER TABLE ONLY messung ALTER COLUMN id SET DEFAULT nextval('bund.messung_id_seq'::regclass); |
861 | |
862 | |
863 -- | |
864 -- Name: fertig; Type: DEFAULT; Schema: land; Owner: - | |
865 -- | |
866 | |
867 ALTER TABLE ONLY messung ALTER COLUMN fertig SET DEFAULT false; | |
868 | |
869 | |
870 -- | |
871 -- Name: letzte_aenderung; Type: DEFAULT; Schema: land; Owner: - | |
872 -- | |
873 | |
874 ALTER TABLE ONLY messung ALTER COLUMN letzte_aenderung SET DEFAULT now(); | |
832 | 875 |
833 | 876 |
834 -- | 877 -- |
835 -- Name: id; Type: DEFAULT; Schema: land; Owner: - | 878 -- Name: id; Type: DEFAULT; Schema: land; Owner: - |
836 -- | 879 -- |
837 | 880 |
838 ALTER TABLE ONLY messung ALTER COLUMN id SET DEFAULT nextval('bund.messung_id_seq'::regclass); | 881 ALTER TABLE ONLY messung_translation ALTER COLUMN id SET DEFAULT nextval('messung_translation_id_seq'::regclass); |
839 | 882 |
840 | 883 |
841 -- | 884 -- |
842 -- Name: fertig; Type: DEFAULT; Schema: land; Owner: - | 885 -- Name: id; Type: DEFAULT; Schema: land; Owner: - |
843 -- | 886 -- |
844 | 887 |
845 ALTER TABLE ONLY messung ALTER COLUMN fertig SET DEFAULT false; | 888 ALTER TABLE ONLY messwert ALTER COLUMN id SET DEFAULT nextval('bund.messwert_id_seq'::regclass); |
889 | |
890 | |
891 -- | |
892 -- Name: grenzwertueberschreitung; Type: DEFAULT; Schema: land; Owner: - | |
893 -- | |
894 | |
895 ALTER TABLE ONLY messwert ALTER COLUMN grenzwertueberschreitung SET DEFAULT false; | |
846 | 896 |
847 | 897 |
848 -- | 898 -- |
849 -- Name: letzte_aenderung; Type: DEFAULT; Schema: land; Owner: - | 899 -- Name: letzte_aenderung; Type: DEFAULT; Schema: land; Owner: - |
850 -- | 900 -- |
851 | 901 |
852 ALTER TABLE ONLY messung ALTER COLUMN letzte_aenderung SET DEFAULT now(); | 902 ALTER TABLE ONLY messwert ALTER COLUMN letzte_aenderung SET DEFAULT now(); |
853 | 903 |
854 | 904 |
855 -- | 905 -- |
856 -- Name: id; Type: DEFAULT; Schema: land; Owner: - | 906 -- Name: id; Type: DEFAULT; Schema: land; Owner: - |
857 -- | 907 -- |
858 | 908 |
859 ALTER TABLE ONLY messung_translation ALTER COLUMN id SET DEFAULT nextval('messung_translation_id_seq'::regclass); | 909 ALTER TABLE ONLY ortszuordnung ALTER COLUMN id SET DEFAULT nextval('bund.ort_id_seq'::regclass); |
860 | |
861 | |
862 -- | |
863 -- Name: id; Type: DEFAULT; Schema: land; Owner: - | |
864 -- | |
865 | |
866 ALTER TABLE ONLY messwert ALTER COLUMN id SET DEFAULT nextval('bund.messwert_id_seq'::regclass); | |
867 | |
868 | |
869 -- | |
870 -- Name: grenzwertueberschreitung; Type: DEFAULT; Schema: land; Owner: - | |
871 -- | |
872 | |
873 ALTER TABLE ONLY messwert ALTER COLUMN grenzwertueberschreitung SET DEFAULT false; | |
874 | 910 |
875 | 911 |
876 -- | 912 -- |
877 -- Name: letzte_aenderung; Type: DEFAULT; Schema: land; Owner: - | 913 -- Name: letzte_aenderung; Type: DEFAULT; Schema: land; Owner: - |
878 -- | 914 -- |
879 | 915 |
880 ALTER TABLE ONLY messwert ALTER COLUMN letzte_aenderung SET DEFAULT now(); | |
881 | |
882 | |
883 -- | |
884 -- Name: id; Type: DEFAULT; Schema: land; Owner: - | |
885 -- | |
886 | |
887 ALTER TABLE ONLY ortszuordnung ALTER COLUMN id SET DEFAULT nextval('bund.ort_id_seq'::regclass); | |
888 | |
889 | |
890 -- | |
891 -- Name: letzte_aenderung; Type: DEFAULT; Schema: land; Owner: - | |
892 -- | |
893 | |
894 ALTER TABLE ONLY ortszuordnung ALTER COLUMN letzte_aenderung SET DEFAULT now(); | 916 ALTER TABLE ONLY ortszuordnung ALTER COLUMN letzte_aenderung SET DEFAULT now(); |
895 | |
896 | |
897 -- | |
898 -- Name: id; Type: DEFAULT; Schema: land; Owner: - | |
899 -- | |
900 | |
901 ALTER TABLE ONLY probe ALTER COLUMN id SET DEFAULT nextval('bund.probe_id_seq'::regclass); | |
902 | |
903 | |
904 -- | |
905 -- Name: test; Type: DEFAULT; Schema: land; Owner: - | |
906 -- | |
907 | |
908 ALTER TABLE ONLY probe ALTER COLUMN test SET DEFAULT false; | |
909 | |
910 | |
911 -- | |
912 -- Name: letzte_aenderung; Type: DEFAULT; Schema: land; Owner: - | |
913 -- | |
914 | |
915 ALTER TABLE ONLY probe ALTER COLUMN letzte_aenderung SET DEFAULT now(); | |
916 | 917 |
917 | 918 |
918 -- | 919 -- |
919 -- Name: id; Type: DEFAULT; Schema: land; Owner: - | 920 -- Name: id; Type: DEFAULT; Schema: land; Owner: - |
920 -- | 921 -- |
1006 ALTER TABLE ONLY ortszuordnung | 1007 ALTER TABLE ONLY ortszuordnung |
1007 ADD CONSTRAINT ortszuordnung_pkey PRIMARY KEY (id); | 1008 ADD CONSTRAINT ortszuordnung_pkey PRIMARY KEY (id); |
1008 | 1009 |
1009 | 1010 |
1010 -- | 1011 -- |
1011 -- Name: probe_pkey; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: | |
1012 -- | |
1013 | |
1014 ALTER TABLE ONLY probe | |
1015 ADD CONSTRAINT probe_pkey PRIMARY KEY (id); | |
1016 | |
1017 | |
1018 -- | |
1019 -- Name: status_protokoll_pkey; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: | 1012 -- Name: status_protokoll_pkey; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: |
1020 -- | 1013 -- |
1021 | 1014 |
1022 ALTER TABLE ONLY status_protokoll | 1015 ALTER TABLE ONLY status_protokoll |
1023 ADD CONSTRAINT status_protokoll_pkey PRIMARY KEY (id); | 1016 ADD CONSTRAINT status_protokoll_pkey PRIMARY KEY (id); |
1064 ALTER TABLE ONLY messprogramm_mmt | 1057 ALTER TABLE ONLY messprogramm_mmt |
1065 ADD CONSTRAINT messprogramm_mmt_pkey PRIMARY KEY (id); | 1058 ADD CONSTRAINT messprogramm_mmt_pkey PRIMARY KEY (id); |
1066 | 1059 |
1067 | 1060 |
1068 -- | 1061 -- |
1069 -- Name: messprogramm_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
1070 -- | |
1071 | |
1072 ALTER TABLE ONLY messprogramm | |
1073 ADD CONSTRAINT messprogramm_pkey PRIMARY KEY (id); | |
1074 | |
1075 | |
1076 -- | |
1077 -- Name: messung_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | 1062 -- Name: messung_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: |
1078 -- | 1063 -- |
1079 | 1064 |
1080 ALTER TABLE ONLY messung | 1065 ALTER TABLE ONLY messung |
1081 ADD CONSTRAINT messung_pkey PRIMARY KEY (id); | 1066 ADD CONSTRAINT messung_pkey PRIMARY KEY (id); |
1120 ALTER TABLE ONLY ortszuordnung | 1105 ALTER TABLE ONLY ortszuordnung |
1121 ADD CONSTRAINT ortszuordnung_pkey PRIMARY KEY (id); | 1106 ADD CONSTRAINT ortszuordnung_pkey PRIMARY KEY (id); |
1122 | 1107 |
1123 | 1108 |
1124 -- | 1109 -- |
1125 -- Name: probe_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | |
1126 -- | |
1127 | |
1128 ALTER TABLE ONLY probe | |
1129 ADD CONSTRAINT probe_pkey PRIMARY KEY (id); | |
1130 | |
1131 | |
1132 -- | |
1133 -- Name: probe_translation_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: | 1110 -- Name: probe_translation_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: |
1134 -- | 1111 -- |
1135 | 1112 |
1136 ALTER TABLE ONLY probe_translation | 1113 ALTER TABLE ONLY probe_translation |
1137 ADD CONSTRAINT probe_translation_pkey PRIMARY KEY (id); | 1114 ADD CONSTRAINT probe_translation_pkey PRIMARY KEY (id); |
1357 ALTER TABLE ONLY ortszuordnung | 1334 ALTER TABLE ONLY ortszuordnung |
1358 ADD CONSTRAINT ortszuordnung_probe_id_fkey FOREIGN KEY (probe_id) REFERENCES probe(id); | 1335 ADD CONSTRAINT ortszuordnung_probe_id_fkey FOREIGN KEY (probe_id) REFERENCES probe(id); |
1359 | 1336 |
1360 | 1337 |
1361 -- | 1338 -- |
1362 -- Name: probe_datenbasis_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - | |
1363 -- | |
1364 | |
1365 ALTER TABLE ONLY probe | |
1366 ADD CONSTRAINT probe_datenbasis_id_fkey FOREIGN KEY (datenbasis_id) REFERENCES stammdaten.datenbasis(id); | |
1367 | |
1368 | |
1369 -- | |
1370 -- Name: probe_labor_mst_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - | |
1371 -- | |
1372 | |
1373 ALTER TABLE ONLY probe | |
1374 ADD CONSTRAINT probe_labor_mst_id_fkey FOREIGN KEY (labor_mst_id) REFERENCES stammdaten.mess_stelle(id); | |
1375 | |
1376 | |
1377 -- | |
1378 -- Name: probe_mst_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - | |
1379 -- | |
1380 | |
1381 ALTER TABLE ONLY probe | |
1382 ADD CONSTRAINT probe_mst_id_fkey FOREIGN KEY (mst_id) REFERENCES stammdaten.mess_stelle(id); | |
1383 | |
1384 | |
1385 -- | |
1386 -- Name: probe_netzbetreiber_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - | |
1387 -- | |
1388 | |
1389 ALTER TABLE ONLY probe | |
1390 ADD CONSTRAINT probe_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES stammdaten.netz_betreiber(id); | |
1391 | |
1392 | |
1393 -- | |
1394 -- Name: probe_probenart_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - | |
1395 -- | |
1396 | |
1397 ALTER TABLE ONLY probe | |
1398 ADD CONSTRAINT probe_probenart_id_fkey FOREIGN KEY (probenart_id) REFERENCES stammdaten.probenart(id); | |
1399 | |
1400 | |
1401 -- | |
1402 -- Name: probe_umw_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - | |
1403 -- | |
1404 | |
1405 ALTER TABLE ONLY probe | |
1406 ADD CONSTRAINT probe_umw_id_fkey FOREIGN KEY (umw_id) REFERENCES stammdaten.umwelt(id); | |
1407 | |
1408 | |
1409 -- | |
1410 -- Name: status_protokoll_status_stufe_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - | 1339 -- Name: status_protokoll_status_stufe_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - |
1411 -- | 1340 -- |
1412 | 1341 |
1413 ALTER TABLE ONLY status_protokoll | 1342 ALTER TABLE ONLY status_protokoll |
1414 ADD CONSTRAINT status_protokoll_status_stufe_fkey FOREIGN KEY (status_stufe) REFERENCES stammdaten.status_stufe(id); | 1343 ADD CONSTRAINT status_protokoll_status_stufe_fkey FOREIGN KEY (status_stufe) REFERENCES stammdaten.status_stufe(id); |
1455 ALTER TABLE ONLY kommentar_p | 1384 ALTER TABLE ONLY kommentar_p |
1456 ADD CONSTRAINT kommentar_p_probe_id_fkey FOREIGN KEY (probe_id) REFERENCES probe(id) ON DELETE CASCADE; | 1385 ADD CONSTRAINT kommentar_p_probe_id_fkey FOREIGN KEY (probe_id) REFERENCES probe(id) ON DELETE CASCADE; |
1457 | 1386 |
1458 | 1387 |
1459 -- | 1388 -- |
1460 -- Name: messprogramm_datenbasis_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - | |
1461 -- | |
1462 | |
1463 ALTER TABLE ONLY messprogramm | |
1464 ADD CONSTRAINT messprogramm_datenbasis_id_fkey FOREIGN KEY (datenbasis_id) REFERENCES stammdaten.datenbasis(id); | |
1465 | |
1466 | |
1467 -- | |
1468 -- Name: messprogramm_mmt_messprogramm_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - | 1389 -- Name: messprogramm_mmt_messprogramm_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - |
1469 -- | 1390 -- |
1470 | 1391 |
1471 ALTER TABLE ONLY messprogramm_mmt | 1392 ALTER TABLE ONLY messprogramm_mmt |
1472 ADD CONSTRAINT messprogramm_mmt_messprogramm_id_fkey FOREIGN KEY (messprogramm_id) REFERENCES messprogramm(id) ON DELETE CASCADE; | 1393 ADD CONSTRAINT messprogramm_mmt_messprogramm_id_fkey FOREIGN KEY (messprogramm_id) REFERENCES messprogramm(id) ON DELETE CASCADE; |
1479 ALTER TABLE ONLY messprogramm_mmt | 1400 ALTER TABLE ONLY messprogramm_mmt |
1480 ADD CONSTRAINT messprogramm_mmt_mmt_id_fkey FOREIGN KEY (mmt_id) REFERENCES stammdaten.mess_methode(id); | 1401 ADD CONSTRAINT messprogramm_mmt_mmt_id_fkey FOREIGN KEY (mmt_id) REFERENCES stammdaten.mess_methode(id); |
1481 | 1402 |
1482 | 1403 |
1483 -- | 1404 -- |
1484 -- Name: messprogramm_mst_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - | |
1485 -- | |
1486 | |
1487 ALTER TABLE ONLY messprogramm | |
1488 ADD CONSTRAINT messprogramm_mst_id_fkey FOREIGN KEY (mst_id) REFERENCES stammdaten.mess_stelle(id); | |
1489 | |
1490 | |
1491 -- | |
1492 -- Name: messprogramm_netzbetreiber_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - | |
1493 -- | |
1494 | |
1495 ALTER TABLE ONLY messprogramm | |
1496 ADD CONSTRAINT messprogramm_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES stammdaten.netz_betreiber(id); | |
1497 | |
1498 | |
1499 -- | |
1500 -- Name: messprogramm_ort_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - | |
1501 -- | |
1502 | |
1503 ALTER TABLE ONLY messprogramm | |
1504 ADD CONSTRAINT messprogramm_ort_id_fkey FOREIGN KEY (ort_id) REFERENCES stammdaten.ort(id); | |
1505 | |
1506 | |
1507 -- | |
1508 -- Name: messprogramm_probenart_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - | |
1509 -- | |
1510 | |
1511 ALTER TABLE ONLY messprogramm | |
1512 ADD CONSTRAINT messprogramm_probenart_id_fkey FOREIGN KEY (probenart_id) REFERENCES stammdaten.probenart(id); | |
1513 | |
1514 | |
1515 -- | |
1516 -- Name: messprogramm_umw_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - | |
1517 -- | |
1518 | |
1519 ALTER TABLE ONLY messprogramm | |
1520 ADD CONSTRAINT messprogramm_umw_id_fkey FOREIGN KEY (umw_id) REFERENCES stammdaten.umwelt(id); | |
1521 | |
1522 | |
1523 -- | |
1524 -- Name: messung_mmt_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - | 1405 -- Name: messung_mmt_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - |
1525 -- | 1406 -- |
1526 | 1407 |
1527 ALTER TABLE ONLY messung | 1408 ALTER TABLE ONLY messung |
1528 ADD CONSTRAINT messung_mmt_id_fkey FOREIGN KEY (mmt_id) REFERENCES stammdaten.mess_methode(id) ON DELETE CASCADE; | 1409 ADD CONSTRAINT messung_mmt_id_fkey FOREIGN KEY (mmt_id) REFERENCES stammdaten.mess_methode(id) ON DELETE CASCADE; |
1599 ALTER TABLE ONLY ortszuordnung | 1480 ALTER TABLE ONLY ortszuordnung |
1600 ADD CONSTRAINT ortszuordnung_probe_id_fkey FOREIGN KEY (probe_id) REFERENCES probe(id) ON DELETE CASCADE; | 1481 ADD CONSTRAINT ortszuordnung_probe_id_fkey FOREIGN KEY (probe_id) REFERENCES probe(id) ON DELETE CASCADE; |
1601 | 1482 |
1602 | 1483 |
1603 -- | 1484 -- |
1604 -- Name: probe_datenbasis_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - | |
1605 -- | |
1606 | |
1607 ALTER TABLE ONLY probe | |
1608 ADD CONSTRAINT probe_datenbasis_id_fkey FOREIGN KEY (datenbasis_id) REFERENCES stammdaten.datenbasis(id); | |
1609 | |
1610 | |
1611 -- | |
1612 -- Name: probe_mst_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - | |
1613 -- | |
1614 | |
1615 ALTER TABLE ONLY probe | |
1616 ADD CONSTRAINT probe_mst_id_fkey FOREIGN KEY (mst_id) REFERENCES stammdaten.mess_stelle(id); | |
1617 | |
1618 | |
1619 -- | |
1620 -- Name: probe_netzbetreiber_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - | |
1621 -- | |
1622 | |
1623 ALTER TABLE ONLY probe | |
1624 ADD CONSTRAINT probe_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES stammdaten.netz_betreiber(id); | |
1625 | |
1626 | |
1627 -- | |
1628 -- Name: probe_probenart_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - | |
1629 -- | |
1630 | |
1631 ALTER TABLE ONLY probe | |
1632 ADD CONSTRAINT probe_probenart_id_fkey FOREIGN KEY (probenart_id) REFERENCES stammdaten.probenart(id); | |
1633 | |
1634 | |
1635 -- | |
1636 -- Name: probe_translation_probe_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - | 1485 -- Name: probe_translation_probe_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - |
1637 -- | 1486 -- |
1638 | 1487 |
1639 ALTER TABLE ONLY probe_translation | 1488 ALTER TABLE ONLY probe_translation |
1640 ADD CONSTRAINT probe_translation_probe_id_fkey FOREIGN KEY (probe_id) REFERENCES probe(id) ON DELETE CASCADE; | 1489 ADD CONSTRAINT probe_translation_probe_id_fkey FOREIGN KEY (probe_id) REFERENCES probe(id) ON DELETE CASCADE; |
1641 | 1490 |
1642 | 1491 |
1643 -- | 1492 -- |
1644 -- Name: probe_umw_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - | |
1645 -- | |
1646 | |
1647 ALTER TABLE ONLY probe | |
1648 ADD CONSTRAINT probe_umw_id_fkey FOREIGN KEY (umw_id) REFERENCES stammdaten.umwelt(id); | |
1649 | |
1650 | |
1651 -- | |
1652 -- Name: status_protokoll_messungs_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - | 1493 -- Name: status_protokoll_messungs_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - |
1653 -- | 1494 -- |
1654 | 1495 |
1655 ALTER TABLE ONLY status_protokoll | 1496 ALTER TABLE ONLY status_protokoll |
1656 ADD CONSTRAINT status_protokoll_messungs_id_fkey FOREIGN KEY (messungs_id) REFERENCES messung(id) ON DELETE CASCADE; | 1497 ADD CONSTRAINT status_protokoll_messungs_id_fkey FOREIGN KEY (messungs_id) REFERENCES messung(id) ON DELETE CASCADE; |