tom@741: -- tom@741: -- PostgreSQL database dump tom@741: -- tom@741: tom@741: SET statement_timeout = 0; tom@741: SET lock_timeout = 0; tom@741: SET client_encoding = 'UTF8'; tom@741: SET standard_conforming_strings = on; tom@741: SET check_function_bodies = false; tom@741: SET client_min_messages = warning; tom@741: tom@741: -- tom@741: -- Name: bund; Type: SCHEMA; Schema: -; Owner: - tom@741: -- tom@741: tom@741: CREATE SCHEMA bund; tom@741: tom@741: tom@741: -- tom@741: -- Name: land; Type: SCHEMA; Schema: -; Owner: - tom@741: -- tom@741: tom@741: CREATE SCHEMA land; tom@741: tom@741: tom@741: -- tom@741: -- Name: stammdaten; Type: SCHEMA; Schema: -; Owner: - tom@741: -- tom@741: tom@741: CREATE SCHEMA stammdaten; tom@741: tom@741: tom@741: -- tom@741: -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: - tom@741: -- tom@741: tom@741: CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; tom@741: tom@741: tom@741: -- tom@741: -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: - tom@741: -- tom@741: tom@741: COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; tom@741: tom@741: tom@741: -- tom@741: -- Name: postgis; Type: EXTENSION; Schema: -; Owner: - tom@741: -- tom@741: tom@741: CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public; tom@741: tom@741: tom@741: -- tom@741: -- Name: EXTENSION postgis; Type: COMMENT; Schema: -; Owner: - tom@741: -- tom@741: tom@741: COMMENT ON EXTENSION postgis IS 'PostGIS geometry, geography, and raster spatial types and functions'; tom@741: tom@741: tom@741: SET search_path = bund, pg_catalog; tom@741: tom@741: -- raimund@751: -- Name: update_time_status(); Type: FUNCTION; Schema: bund; Owner: - raimund@751: -- raimund@751: raimund@751: CREATE FUNCTION update_time_status() RETURNS trigger tom@741: LANGUAGE plpgsql tom@741: AS $$ tom@741: BEGIN raimund@751: NEW.tree_modified = now(); raimund@751: RETURN NEW; tom@741: END; tom@741: $$; tom@741: tom@741: tom@741: SET search_path = land, pg_catalog; tom@741: tom@741: -- tom@741: -- Name: is_probe_fertig(integer); Type: FUNCTION; Schema: land; Owner: - tom@741: -- tom@741: tom@741: CREATE FUNCTION is_probe_fertig(i1 integer) RETURNS boolean tom@741: LANGUAGE plpgsql STABLE SECURITY DEFINER tom@741: AS $_$ tom@741: DECLARE result BOOLEAN; tom@741: BEGIN tom@741: SELECT (count(id) > 0) INTO result from land.messung where probe_id = $1 and fertig = TRUE; tom@741: RETURN result; tom@741: END; tom@741: $_$; tom@741: tom@741: tom@741: -- tom@741: -- Name: update_time_messung(); Type: FUNCTION; Schema: land; Owner: - tom@741: -- tom@741: tom@741: CREATE FUNCTION update_time_messung() RETURNS trigger tom@741: LANGUAGE plpgsql tom@741: AS $$ tom@741: BEGIN tom@741: RAISE NOTICE 'messung is %',NEW.id; tom@741: NEW.tree_modified = now(); tom@741: UPDATE land.messwert SET tree_modified = now() WHERE messungs_id = NEW.id; raimund@751: UPDATE bund.status_protokoll SET tree_modified = now() WHERE messungs_id = NEW.id; tom@741: RETURN NEW; tom@741: END; tom@741: $$; tom@741: tom@741: tom@741: -- tom@741: -- Name: update_time_messwert(); Type: FUNCTION; Schema: land; Owner: - tom@741: -- tom@741: tom@741: CREATE FUNCTION update_time_messwert() RETURNS trigger tom@741: LANGUAGE plpgsql tom@741: AS $$ tom@741: BEGIN tom@741: NEW.tree_modified = now(); tom@741: RETURN NEW; tom@741: END; tom@741: $$; tom@741: tom@741: tom@741: -- tom@741: -- Name: update_time_ort(); Type: FUNCTION; Schema: land; Owner: - tom@741: -- tom@741: tom@741: CREATE FUNCTION update_time_ort() RETURNS trigger tom@741: LANGUAGE plpgsql tom@741: AS $$ tom@741: BEGIN tom@741: NEW.tree_modified = now(); tom@741: RETURN NEW; tom@741: END; tom@741: $$; tom@741: tom@741: tom@741: -- tom@741: -- Name: update_time_probe(); Type: FUNCTION; Schema: land; Owner: - tom@741: -- tom@741: tom@741: CREATE FUNCTION update_time_probe() RETURNS trigger tom@741: LANGUAGE plpgsql tom@741: AS $$ tom@741: BEGIN tom@741: RAISE NOTICE 'probe is %',NEW.id; tom@741: NEW.tree_modified = now(); tom@741: RAISE NOTICE 'updating other rows'; tom@741: UPDATE land.messung SET tree_modified = now() WHERE probe_id = NEW.id; tom@741: UPDATE land.ort SET tree_modified = now() WHERE probe_id = NEW.id; tom@741: UPDATE land.zusatz_wert SET tree_modified = now() WHERE probe_id = NEW.id; tom@741: RETURN NEW; tom@741: END; tom@741: $$; tom@741: tom@741: tom@741: -- tom@741: -- Name: update_time_zusatzwert(); Type: FUNCTION; Schema: land; Owner: - tom@741: -- tom@741: tom@741: CREATE FUNCTION update_time_zusatzwert() RETURNS trigger tom@741: LANGUAGE plpgsql tom@741: AS $$ tom@741: BEGIN tom@741: NEW.tree_modified = now(); tom@741: RETURN NEW; tom@741: END; tom@741: $$; tom@741: tom@741: tom@741: SET search_path = stammdaten, pg_catalog; tom@741: tom@741: -- tom@741: -- Name: get_media_from_media_desk(character varying); Type: FUNCTION; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE FUNCTION get_media_from_media_desk(media_desk character varying) RETURNS character varying tom@741: LANGUAGE plpgsql tom@741: AS $$ tom@741: declare tom@741: result character varying(100); tom@741: d00 smallint; tom@741: d01 smallint; tom@741: d02 smallint; tom@741: d03 smallint; tom@741: begin tom@741: if media_desk like 'D: %' then tom@741: d00 := substring(media_desk,4,2); tom@741: d01 := substring(media_desk,7,2); tom@741: d02 := substring(media_desk,10,2); tom@741: d03 := substring(media_desk,13,2); tom@741: if d00 = '00' then tom@741: result := null; tom@741: else tom@741: if d01 = '00' then tom@741: select s00.beschreibung into result FROM stammdaten.deskriptoren s00 tom@741: where s00.ebene = 0 and s00.sn = d00::smallint; tom@741: else tom@741: if d02 = '00' or d00 <> '01' then tom@741: select s01.beschreibung into result FROM stammdaten.deskriptoren s01 tom@741: where s01.ebene = 1 and s01.sn = d01::smallint tom@741: and s01.vorgaenger = tom@741: (select s00.id FROM stammdaten.deskriptoren s00 tom@741: where s00.ebene = 0 and s00.sn = d00::smallint); tom@741: else tom@741: if d03 = '00' then tom@741: select s02.beschreibung into result FROM stammdaten.deskriptoren s02 tom@741: where s02.ebene = 2 and s02.sn = d02::smallint tom@741: and s02.vorgaenger = tom@741: (select s01.id FROM stammdaten.deskriptoren s01 tom@741: where s01.ebene = 1 and s01.sn = d01::smallint tom@741: and s01.vorgaenger = tom@741: (select s00.id FROM stammdaten.deskriptoren s00 tom@741: where s00.ebene = 0 and s00.sn = d00::smallint)); tom@741: else tom@741: select s03.beschreibung into result FROM stammdaten.deskriptoren s03 tom@741: where s03.ebene = 3 and s03.sn = d03::smallint tom@741: and s03.vorgaenger = tom@741: (select s02.id FROM stammdaten.deskriptoren s02 tom@741: where s02.ebene = 2 and s02.sn = d02::smallint tom@741: and s02.vorgaenger = tom@741: (select s01.id FROM stammdaten.deskriptoren s01 tom@741: where s01.ebene = 1 and s01.sn = d01::smallint tom@741: and s01.vorgaenger = tom@741: (select s00.id FROM stammdaten.deskriptoren s00 tom@741: where s00.ebene = 0 and s00.sn = d00::smallint))); tom@741: end if; tom@741: end if; tom@741: end if; tom@741: end if; tom@741: else tom@741: result := null; tom@741: end if; tom@741: return (result); tom@741: end; tom@741: $$; tom@741: tom@741: tom@741: SET search_path = bund, pg_catalog; tom@741: tom@741: -- tom@741: -- Name: kommentar_id_seq; Type: SEQUENCE; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE kommentar_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: SET default_tablespace = ''; tom@741: tom@741: SET default_with_oids = false; tom@741: tom@741: -- tom@741: -- Name: kommentar; Type: TABLE; Schema: bund; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE kommentar ( tom@741: id integer DEFAULT nextval('kommentar_id_seq'::regclass) NOT NULL, tom@741: erzeuger character varying(5) NOT NULL, tom@741: datum timestamp without time zone DEFAULT now(), tom@741: text character varying(1024) tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: kommentar_m; Type: TABLE; Schema: bund; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE kommentar_m ( tom@741: messungs_id integer NOT NULL tom@741: ) tom@741: INHERITS (kommentar); tom@741: tom@741: tom@741: -- tom@741: -- Name: kommentar_p; Type: TABLE; Schema: bund; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE kommentar_p ( tom@741: probe_id integer NOT NULL tom@741: ) tom@741: INHERITS (kommentar); tom@741: tom@741: tom@741: -- tom@741: -- Name: list; Type: TABLE; Schema: bund; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE list ( tom@741: id integer NOT NULL, tom@741: typ character(1) NOT NULL, tom@741: bezeichnung character varying(20) NOT NULL, tom@741: beschreibuing character varying(512), tom@741: letzte_aenderung timestamp with time zone NOT NULL, tom@741: gueltig_bis timestamp with time zone tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: list_id_seq; Type: SEQUENCE; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE list_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: list_id_seq; Type: SEQUENCE OWNED BY; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER SEQUENCE list_id_seq OWNED BY list.id; tom@741: tom@741: tom@741: -- tom@741: -- Name: list_zuordnung; Type: TABLE; Schema: bund; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE list_zuordnung ( tom@741: list_id integer NOT NULL, tom@741: probe_id integer tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: messung_id_seq; Type: SEQUENCE; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE messung_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: messung; Type: TABLE; Schema: bund; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE messung ( tom@741: id integer DEFAULT nextval('messung_id_seq'::regclass) NOT NULL, tom@741: probe_id integer NOT NULL, tom@741: nebenproben_nr character varying(10), tom@741: mmt_id character varying(2) NOT NULL, tom@741: messdauer integer, tom@741: messzeitpunkt timestamp with time zone, tom@741: fertig boolean DEFAULT false NOT NULL, raimund@751: status integer, tom@741: letzte_aenderung timestamp without time zone DEFAULT now() tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: messung_messung_id_alt_seq; Type: SEQUENCE; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE messung_messung_id_alt_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: messung_messungs_id_seq; Type: SEQUENCE; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE messung_messungs_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: messwert_id_seq; Type: SEQUENCE; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE messwert_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: messwert; Type: TABLE; Schema: bund; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE messwert ( tom@741: id integer DEFAULT nextval('messwert_id_seq'::regclass) NOT NULL, tom@741: messungs_id integer NOT NULL, tom@741: messgroesse_id integer NOT NULL, tom@741: messwert_nwg character varying(1), tom@741: messwert real NOT NULL, tom@741: messfehler real, tom@741: nwg_zu_messwert real, tom@741: meh_id smallint NOT NULL, tom@741: grenzwertueberschreitung boolean DEFAULT false, tom@741: letzte_aenderung timestamp without time zone DEFAULT now() tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: ort_id_seq; Type: SEQUENCE; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE ort_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: ort; Type: TABLE; Schema: bund; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE ort ( tom@741: id integer DEFAULT nextval('ort_id_seq'::regclass) NOT NULL, tom@741: probe_id integer NOT NULL, tom@741: ort_id bigint NOT NULL, tom@741: orts_typ character varying(1), tom@741: ortszusatztext character varying(100), tom@741: letzte_aenderung timestamp without time zone DEFAULT now() tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: COLUMN ort.orts_typ; Type: COMMENT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: COMMENT ON COLUMN ort.orts_typ IS 'E = Entnahmeport, U = Ursprungsort, Z = Ortszusatz'; tom@741: tom@741: tom@741: -- tom@741: -- Name: probe_id_seq; Type: SEQUENCE; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE probe_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: probe; Type: TABLE; Schema: bund; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE probe ( tom@741: id integer DEFAULT nextval('probe_id_seq'::regclass) NOT NULL, tom@741: test boolean DEFAULT false NOT NULL, tom@741: netzbetreiber_id character varying(2), tom@741: mst_id character varying(5), raimund@751: labor_mst_id character varying(5), tom@741: hauptproben_nr character varying(20), tom@741: datenbasis_id smallint, tom@741: ba_id character varying(1), tom@741: probenart_id smallint NOT NULL, tom@741: media_desk character varying(100), tom@741: media character varying(100), tom@741: umw_id character varying(3), tom@741: probeentnahme_beginn timestamp with time zone, tom@741: probeentnahme_ende timestamp with time zone, tom@741: mittelungsdauer bigint, tom@741: letzte_aenderung timestamp without time zone DEFAULT now() tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: COLUMN probe.id; Type: COMMENT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: COMMENT ON COLUMN probe.id IS 'interner Probenschlüssel'; tom@741: tom@741: tom@741: -- tom@741: -- Name: COLUMN probe.test; Type: COMMENT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: COMMENT ON COLUMN probe.test IS 'Ist Testdatensatz?'; tom@741: tom@741: tom@741: -- tom@741: -- Name: COLUMN probe.mst_id; Type: COMMENT; Schema: bund; Owner: - tom@741: -- tom@741: raimund@751: COMMENT ON COLUMN probe.mst_id IS 'ID für Messstelle'; raimund@751: raimund@751: raimund@751: -- raimund@751: -- Name: COLUMN probe.labor_mst_id; Type: COMMENT; Schema: bund; Owner: - raimund@751: -- raimund@751: raimund@751: COMMENT ON COLUMN probe.labor_mst_id IS '-- ID für Messlabor'; tom@741: tom@741: tom@741: -- tom@741: -- Name: COLUMN probe.hauptproben_nr; Type: COMMENT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: COMMENT ON COLUMN probe.hauptproben_nr IS 'externer Probensclüssel'; tom@741: tom@741: tom@741: -- tom@741: -- Name: COLUMN probe.ba_id; Type: COMMENT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: COMMENT ON COLUMN probe.ba_id IS 'ID der Betriebsart (normal/Routine oder Störfall/intensiv)'; tom@741: tom@741: tom@741: -- tom@741: -- Name: COLUMN probe.probenart_id; Type: COMMENT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: COMMENT ON COLUMN probe.probenart_id IS 'ID der Probenart(Einzel-, Sammel-, Misch- ...Probe)'; tom@741: tom@741: tom@741: -- tom@741: -- Name: COLUMN probe.media_desk; Type: COMMENT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: COMMENT ON COLUMN probe.media_desk IS 'Mediencodierung (Deskriptoren oder ADV-Codierung)'; tom@741: tom@741: tom@741: -- tom@741: -- Name: COLUMN probe.media; Type: COMMENT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: COMMENT ON COLUMN probe.media IS 'dekodierte Medienbezeichnung (aus media_desk abgeleitet)'; tom@741: tom@741: tom@741: -- tom@741: -- Name: COLUMN probe.umw_id; Type: COMMENT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: COMMENT ON COLUMN probe.umw_id IS 'ID für Umweltbereich'; tom@741: tom@741: tom@741: -- tom@741: -- Name: probe_probe_id_seq; Type: SEQUENCE; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE probe_probe_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- raimund@751: -- Name: status_protokoll; Type: TABLE; Schema: bund; Owner: -; Tablespace: raimund@751: -- raimund@751: raimund@751: CREATE TABLE status_protokoll ( raimund@751: status_stufe integer NOT NULL, raimund@751: status_wert integer NOT NULL, raimund@751: tree_modified timestamp without time zone DEFAULT now() raimund@751: ) raimund@751: INHERITS (kommentar_m); tom@741: tom@741: tom@741: -- tom@741: -- Name: zusatz_wert_id_seq; Type: SEQUENCE; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE zusatz_wert_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: zusatz_wert; Type: TABLE; Schema: bund; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE zusatz_wert ( tom@741: id integer DEFAULT nextval('zusatz_wert_id_seq'::regclass) NOT NULL, tom@741: probe_id integer NOT NULL, tom@741: pzs_id character varying(3) NOT NULL, tom@741: messwert_pzs real, tom@741: messfehler real, tom@741: letzte_aenderung timestamp without time zone DEFAULT now(), tom@741: nwg_zu_messwert real tom@741: ); tom@741: tom@741: tom@741: SET search_path = land, pg_catalog; tom@741: tom@741: -- tom@741: -- Name: kommentar_m; Type: TABLE; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE kommentar_m ( tom@741: ) tom@741: INHERITS (bund.kommentar_m); tom@741: tom@741: tom@741: -- tom@741: -- Name: kommentar_p; Type: TABLE; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE kommentar_p ( tom@741: ) tom@741: INHERITS (bund.kommentar_p); tom@741: tom@741: tom@741: -- tom@741: -- Name: messprogramm; Type: TABLE; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE messprogramm ( tom@741: id integer NOT NULL, tom@741: name character varying(256), tom@741: test boolean DEFAULT false NOT NULL, tom@741: netzbetreiber_id character varying(2) NOT NULL, tom@741: mst_id character varying(5) NOT NULL, tom@741: datenbasis_id integer NOT NULL, tom@741: ba_id character varying(1), tom@741: gem_id character varying(8), tom@741: ort_id integer, tom@741: media_desk character varying(100), tom@741: umw_id character varying(3), tom@741: probenart_id integer NOT NULL, tom@741: probenintervall character varying(2), tom@741: teilintervall_von integer, tom@741: teilintervall_bis integer, tom@741: intervall_offset integer, tom@741: gueltig_von integer, tom@741: gueltig_bis integer, tom@741: probe_nehmer_id integer, tom@741: probe_kommentar character varying(80), tom@741: letzte_aenderung timestamp without time zone DEFAULT now() NOT NULL tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: COLUMN messprogramm.media_desk; Type: COMMENT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: COMMENT ON COLUMN messprogramm.media_desk IS 'dekodierte Medienbezeichnung (aus media_desk abgeleitet)'; tom@741: tom@741: tom@741: -- tom@741: -- Name: messprogramm_id_seq; Type: SEQUENCE; Schema: land; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE messprogramm_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: messprogramm_id_seq; Type: SEQUENCE OWNED BY; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER SEQUENCE messprogramm_id_seq OWNED BY messprogramm.id; tom@741: tom@741: tom@741: -- tom@741: -- Name: messprogramm_mmt; Type: TABLE; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE messprogramm_mmt ( tom@741: id integer NOT NULL, tom@741: messprogramm_id integer NOT NULL, tom@741: mmt_id character varying(2) NOT NULL, tom@741: messgroessen integer[], tom@741: letzte_aenderung timestamp without time zone DEFAULT now() tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: messprogramm_mmt_id_seq; Type: SEQUENCE; Schema: land; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE messprogramm_mmt_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: messprogramm_mmt_id_seq; Type: SEQUENCE OWNED BY; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER SEQUENCE messprogramm_mmt_id_seq OWNED BY messprogramm_mmt.id; tom@741: tom@741: tom@741: -- tom@741: -- Name: messung; Type: TABLE; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE messung ( tom@741: geplant boolean DEFAULT false NOT NULL, tom@741: tree_modified timestamp without time zone DEFAULT now() tom@741: ) tom@741: INHERITS (bund.messung); tom@741: tom@741: tom@741: -- tom@741: -- Name: messung_translation; Type: TABLE; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE messung_translation ( tom@741: id integer NOT NULL, tom@741: messungs_id integer NOT NULL, tom@741: messungs_id_alt integer DEFAULT nextval('bund.messung_messung_id_alt_seq'::regclass) NOT NULL tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: messung_translation_id_seq; Type: SEQUENCE; Schema: land; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE messung_translation_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: messung_translation_id_seq; Type: SEQUENCE OWNED BY; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER SEQUENCE messung_translation_id_seq OWNED BY messung_translation.id; tom@741: tom@741: tom@741: -- tom@741: -- Name: messwert; Type: TABLE; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE messwert ( tom@741: tree_modified timestamp without time zone DEFAULT now() tom@741: ) tom@741: INHERITS (bund.messwert); tom@741: tom@741: tom@741: -- tom@741: -- Name: ort; Type: TABLE; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE ort ( tom@741: tree_modified timestamp without time zone DEFAULT now() tom@741: ) tom@741: INHERITS (bund.ort); tom@741: tom@741: tom@741: -- tom@741: -- Name: probe; Type: TABLE; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE probe ( tom@741: erzeuger_id integer, tom@741: probe_nehmer_id integer, tom@741: mp_kat character(1), tom@741: mpl_id character varying(3), tom@741: mpr_id integer, tom@741: solldatum_beginn timestamp without time zone, tom@741: solldatum_ende timestamp without time zone, tom@741: tree_modified timestamp without time zone DEFAULT now() tom@741: ) tom@741: INHERITS (bund.probe); tom@741: tom@741: tom@741: -- tom@741: -- Name: probe_translation; Type: TABLE; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE probe_translation ( tom@741: id integer NOT NULL, tom@741: probe_id integer NOT NULL, tom@741: probe_id_alt character varying(20) DEFAULT (('sss'::text || lpad(((nextval('bund.probe_probe_id_seq'::regclass))::character varying)::text, 12, '0'::text)) || 'Y'::text) NOT NULL tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: probe_translation_id_seq; Type: SEQUENCE; Schema: land; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE probe_translation_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: probe_translation_id_seq; Type: SEQUENCE OWNED BY; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER SEQUENCE probe_translation_id_seq OWNED BY probe_translation.id; tom@741: tom@741: tom@741: -- raimund@751: -- Name: status_protokoll; Type: TABLE; Schema: land; Owner: -; Tablespace: raimund@751: -- raimund@751: raimund@751: CREATE TABLE status_protokoll ( tom@741: ) raimund@751: INHERITS (bund.status_protokoll); tom@741: tom@741: tom@741: -- tom@741: -- Name: zusatz_wert; Type: TABLE; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE zusatz_wert ( tom@741: tree_modified timestamp without time zone DEFAULT now() tom@741: ) tom@741: INHERITS (bund.zusatz_wert); tom@741: tom@741: tom@741: SET search_path = stammdaten, pg_catalog; tom@741: tom@741: -- tom@741: -- Name: auth; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE auth ( tom@741: id integer NOT NULL, tom@741: ldap_group character varying(40) NOT NULL, tom@741: netzbetreiber_id character varying(2), tom@741: mst_id character varying(5) tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: auth_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE auth_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: auth_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER SEQUENCE auth_id_seq OWNED BY auth.id; tom@741: tom@741: tom@741: -- tom@741: -- Name: datenbasis; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE datenbasis ( tom@741: id integer NOT NULL, tom@741: beschreibung character varying(30), tom@741: datenbasis character varying(6) tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: datenbasis_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE datenbasis_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: datenbasis_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER SEQUENCE datenbasis_id_seq OWNED BY datenbasis.id; tom@741: tom@741: tom@741: -- tom@741: -- Name: de_vg; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE de_vg ( tom@741: id integer NOT NULL, tom@741: use double precision, tom@741: rs character varying(12), tom@741: gf double precision, tom@741: rau_rs character varying(12), tom@741: gen character varying(50), tom@741: des character varying(75), tom@741: isn double precision, tom@741: bemerk character varying(75), tom@741: nambild character varying(16), tom@741: ags character varying(12), tom@741: rs_alt character varying(20), tom@741: wirksamkei date, tom@741: debkg_id character varying(16), tom@741: length numeric, tom@741: shape_area numeric, tom@741: geom public.geometry(MultiPolygon,4326) tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: de_vg_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE de_vg_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: de_vg_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER SEQUENCE de_vg_id_seq OWNED BY de_vg.id; tom@741: tom@741: tom@741: -- tom@741: -- Name: deskriptor_umwelt; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE deskriptor_umwelt ( tom@741: id integer NOT NULL, tom@741: s00 integer NOT NULL, tom@741: s01 integer NOT NULL, tom@741: s02 integer, tom@741: s03 integer, tom@741: s04 integer, tom@741: s05 integer, tom@741: s06 integer, tom@741: s07 integer, tom@741: s08 integer, tom@741: s09 integer, tom@741: s10 integer, tom@741: s11 integer, tom@741: s12 integer, tom@741: umw_id character varying(3) NOT NULL tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: deskriptoren; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE deskriptoren ( tom@741: id integer NOT NULL, tom@741: vorgaenger integer, tom@741: ebene smallint, tom@741: s_xx integer, tom@741: sn smallint, tom@741: beschreibung character varying(100), tom@741: bedeutung character varying(300) tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: deskriptoren_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE deskriptoren_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: deskriptoren_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER SEQUENCE deskriptoren_id_seq OWNED BY deskriptoren.id; tom@741: tom@741: tom@741: -- tom@741: -- Name: koordinaten_art; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE koordinaten_art ( tom@741: id integer NOT NULL, tom@741: koordinatenart character varying(50), tom@741: idf_geo_key character varying(1) tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: koordinaten_art_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE koordinaten_art_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: koordinaten_art_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER SEQUENCE koordinaten_art_id_seq OWNED BY koordinaten_art.id; tom@741: tom@741: tom@741: -- tom@741: -- Name: mess_einheit; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE mess_einheit ( tom@741: id integer NOT NULL, tom@741: beschreibung character varying(50), tom@741: einheit character varying(12), tom@741: eudf_messeinheit_id character varying(8), tom@741: umrechnungs_faktor_eudf bigint tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: mess_einheit_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE mess_einheit_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: mess_einheit_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER SEQUENCE mess_einheit_id_seq OWNED BY mess_einheit.id; tom@741: tom@741: tom@741: -- tom@741: -- Name: mess_methode; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE mess_methode ( tom@741: id character varying(2) NOT NULL, tom@741: beschreibung character varying(300), tom@741: messmethode character varying(50) tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: mess_stelle; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE mess_stelle ( tom@741: id character varying(5) NOT NULL, tom@741: netzbetreiber_id character varying(2), tom@741: beschreibung character varying(300), tom@741: mess_stelle character varying(60), tom@741: mst_typ character varying(1), tom@741: amtskennung character varying(6) tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: messgroesse; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE messgroesse ( tom@741: id integer NOT NULL, tom@741: beschreibung character varying(300), tom@741: messgroesse character varying(50) NOT NULL, tom@741: default_farbe character varying(9), tom@741: idf_nuklid_key character varying(6), tom@741: ist_leitnuklid boolean DEFAULT false, tom@741: eudf_nuklid_id bigint, tom@741: kennung_bvl character varying(7) tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: messgroesse_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE messgroesse_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: messgroesse_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER SEQUENCE messgroesse_id_seq OWNED BY messgroesse.id; tom@741: tom@741: tom@741: -- tom@741: -- Name: messgroessen_gruppe; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE messgroessen_gruppe ( tom@741: id integer NOT NULL, tom@741: bezeichnung character varying(80), tom@741: ist_leitnuklidgruppe character(1) DEFAULT NULL::bpchar tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: messgroessen_gruppe_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE messgroessen_gruppe_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: messgroessen_gruppe_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER SEQUENCE messgroessen_gruppe_id_seq OWNED BY messgroessen_gruppe.id; tom@741: tom@741: tom@741: -- tom@741: -- Name: mg_grp; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE mg_grp ( tom@741: messgroessengruppe_id integer NOT NULL, tom@741: messgroesse_id integer NOT NULL tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: mmt_messgroesse_grp; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE mmt_messgroesse_grp ( tom@741: messgroessengruppe_id integer NOT NULL, tom@741: mmt_id character varying(2) NOT NULL tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: mmt_messgroesse; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW mmt_messgroesse AS tom@741: SELECT mmt_messgroesse_grp.mmt_id, tom@741: mg_grp.messgroesse_id tom@741: FROM mmt_messgroesse_grp, tom@741: mg_grp tom@741: WHERE (mg_grp.messgroessengruppe_id = mmt_messgroesse_grp.messgroessengruppe_id); tom@741: tom@741: tom@741: -- tom@741: -- Name: netz_betreiber; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE netz_betreiber ( tom@741: id character varying(2) NOT NULL, tom@741: netzbetreiber character varying(50), tom@741: idf_netzbetreiber character varying(1), tom@741: is_bmn boolean DEFAULT false, tom@741: mailverteiler character varying(512), tom@741: aktiv boolean DEFAULT false, tom@741: zust_mst_id character varying(5) tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: ort; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE ort ( tom@741: id integer NOT NULL, tom@741: o_typ character varying(1), tom@741: netzbetreiber_id character varying(2), tom@741: bezeichnung character varying(10), tom@741: beschreibung character varying(100), tom@741: staat_id smallint, tom@741: gem_id character varying(8), tom@741: unscharf character(1) DEFAULT NULL::bpchar, tom@741: nuts_code character varying(10), tom@741: kda_id integer, tom@741: koord_x_extern character varying(22), tom@741: koord_y_extern character varying(22), tom@741: hoehe_land real, tom@741: letzte_aenderung timestamp without time zone DEFAULT now(), tom@741: latitude double precision, tom@741: longitude double precision, tom@741: geom public.geometry(Point,4326), tom@741: shape public.geometry(MultiPolygon,4326) tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: COLUMN ort.o_typ; Type: COMMENT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: COMMENT ON COLUMN ort.o_typ IS 'D = dynamischer Messpunkt (nicht vordefiniert) tom@741: V = vordefinierter Messpunkt tom@741: R = REI-Messpunkt tom@741: S = Station tom@741: Z = Ortzszusatz'; tom@741: tom@741: tom@741: -- tom@741: -- Name: ort_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE ort_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: ort_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER SEQUENCE ort_id_seq OWNED BY ort.id; tom@741: tom@741: tom@741: -- tom@741: -- Name: pflicht_messgroesse; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE pflicht_messgroesse ( tom@741: id integer NOT NULL, tom@741: messgroesse_id integer, tom@741: mmt_id character varying(2), tom@741: umw_id character varying(3), tom@741: datenbasis_id smallint NOT NULL tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: pflicht_messgroesse_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE pflicht_messgroesse_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: pflicht_messgroesse_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER SEQUENCE pflicht_messgroesse_id_seq OWNED BY pflicht_messgroesse.id; tom@741: tom@741: tom@741: -- tom@741: -- Name: proben_zusatz; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE proben_zusatz ( tom@741: id character varying(3) NOT NULL, tom@741: meh_id integer, tom@741: beschreibung character varying(50) NOT NULL, tom@741: zusatzwert character varying(7) NOT NULL, tom@741: eudf_keyword character varying(40) tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: probenart; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE probenart ( tom@741: id integer NOT NULL, tom@741: beschreibung character varying(30), tom@741: probenart character varying(5) NOT NULL, tom@741: probenart_eudf_id character varying(1) NOT NULL tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: probenart_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE probenart_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: probenart_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER SEQUENCE probenart_id_seq OWNED BY probenart.id; tom@741: tom@741: tom@741: -- tom@741: -- Name: s_00_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_00_view AS tom@741: SELECT deskriptoren.s_xx AS s00, tom@741: deskriptoren.bedeutung, tom@741: deskriptoren.beschreibung, tom@741: deskriptoren.sn tom@741: FROM deskriptoren tom@741: WHERE (deskriptoren.ebene = 0); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_01_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_01_view AS tom@741: SELECT d1.s_xx AS s01, tom@741: d2.s_xx AS s00, tom@741: d1.bedeutung, tom@741: d1.beschreibung, tom@741: d1.sn tom@741: FROM (deskriptoren d1 tom@741: JOIN deskriptoren d2 ON ((d1.vorgaenger = d2.id))) tom@741: WHERE (d1.ebene = 1); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_02_s_01_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_02_s_01_view AS tom@741: SELECT d1.s_xx AS s01, tom@741: d2.s_xx AS s02 tom@741: FROM (deskriptoren d1 tom@741: JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) tom@741: WHERE (d2.ebene = 2); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_02_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_02_view AS tom@741: SELECT DISTINCT deskriptoren.s_xx AS s00, tom@741: deskriptoren.bedeutung, tom@741: deskriptoren.beschreibung, tom@741: deskriptoren.sn tom@741: FROM deskriptoren tom@741: WHERE (deskriptoren.ebene = 2); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_03_s_01_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_03_s_01_view AS tom@741: SELECT d1.s_xx AS s01, tom@741: d2.s_xx AS s03 tom@741: FROM (deskriptoren d1 tom@741: JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) tom@741: WHERE ((d2.ebene = 3) AND (d1.ebene = 1)); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_03_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_03_view AS tom@741: SELECT d1.s_xx AS s03, tom@741: d2.s_xx AS s02, tom@741: d1.bedeutung, tom@741: d1.beschreibung, tom@741: d1.sn tom@741: FROM (deskriptoren d1 tom@741: JOIN deskriptoren d2 ON ((d1.vorgaenger = d2.id))) tom@741: WHERE ((d1.ebene = 3) AND (d2.ebene = 2)) tom@741: UNION tom@741: SELECT d1.s_xx AS s03, tom@741: NULL::integer AS s02, tom@741: d1.bedeutung, tom@741: d1.beschreibung, tom@741: d1.sn tom@741: FROM (deskriptoren d1 tom@741: JOIN deskriptoren d2 ON ((d1.vorgaenger = d2.id))) tom@741: WHERE ((d1.ebene = 3) AND (d2.ebene = 1)); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_04_s_01_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_04_s_01_view AS tom@741: SELECT DISTINCT d1.s_xx AS s01, tom@741: d2.s_xx AS s04 tom@741: FROM (deskriptoren d1 tom@741: JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) tom@741: WHERE (d2.ebene = 4); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_04_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_04_view AS tom@741: SELECT DISTINCT deskriptoren.s_xx AS s04, tom@741: deskriptoren.bedeutung, tom@741: deskriptoren.beschreibung, tom@741: deskriptoren.sn tom@741: FROM deskriptoren tom@741: WHERE (deskriptoren.ebene = 4); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_05_s_01_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_05_s_01_view AS tom@741: SELECT d1.s_xx AS s01, tom@741: d2.s_xx AS s05 tom@741: FROM (deskriptoren d1 tom@741: JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) tom@741: WHERE (d2.ebene = 5); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_05_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_05_view AS tom@741: SELECT DISTINCT deskriptoren.s_xx AS s05, tom@741: deskriptoren.bedeutung, tom@741: deskriptoren.beschreibung, tom@741: deskriptoren.sn tom@741: FROM deskriptoren tom@741: WHERE (deskriptoren.ebene = 5); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_06_s_01_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_06_s_01_view AS tom@741: SELECT d1.s_xx AS s01, tom@741: d2.s_xx AS s06 tom@741: FROM (deskriptoren d1 tom@741: JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) tom@741: WHERE (d2.ebene = 6); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_06_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_06_view AS tom@741: SELECT DISTINCT deskriptoren.s_xx AS s06, tom@741: deskriptoren.bedeutung, tom@741: deskriptoren.beschreibung, tom@741: deskriptoren.sn tom@741: FROM deskriptoren tom@741: WHERE (deskriptoren.ebene = 6); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_07_s_01_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_07_s_01_view AS tom@741: SELECT d1.s_xx AS s01, tom@741: d2.s_xx AS s07 tom@741: FROM (deskriptoren d1 tom@741: JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) tom@741: WHERE (d2.ebene = 7); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_07_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_07_view AS tom@741: SELECT DISTINCT deskriptoren.s_xx AS s07, tom@741: deskriptoren.bedeutung, tom@741: deskriptoren.beschreibung, tom@741: deskriptoren.sn tom@741: FROM deskriptoren tom@741: WHERE (deskriptoren.ebene = 7); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_08_s_01_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_08_s_01_view AS tom@741: SELECT d1.s_xx AS s01, tom@741: d2.s_xx AS s08 tom@741: FROM (deskriptoren d1 tom@741: JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) tom@741: WHERE (d2.ebene = 8); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_08_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_08_view AS tom@741: SELECT DISTINCT deskriptoren.s_xx AS s08, tom@741: deskriptoren.bedeutung, tom@741: deskriptoren.beschreibung, tom@741: deskriptoren.sn tom@741: FROM deskriptoren tom@741: WHERE (deskriptoren.ebene = 8); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_09_s_01_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_09_s_01_view AS tom@741: SELECT d1.s_xx AS s01, tom@741: d2.s_xx AS s09 tom@741: FROM (deskriptoren d1 tom@741: JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) tom@741: WHERE (d2.ebene = 9); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_09_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_09_view AS tom@741: SELECT DISTINCT deskriptoren.s_xx AS s09, tom@741: deskriptoren.bedeutung, tom@741: deskriptoren.beschreibung, tom@741: deskriptoren.sn tom@741: FROM deskriptoren tom@741: WHERE (deskriptoren.ebene = 9); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_10_s_01_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_10_s_01_view AS tom@741: SELECT d1.s_xx AS s01, tom@741: d2.s_xx AS s10 tom@741: FROM (deskriptoren d1 tom@741: JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) tom@741: WHERE (d2.ebene = 10); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_10_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_10_view AS tom@741: SELECT DISTINCT deskriptoren.s_xx AS s10, tom@741: deskriptoren.bedeutung, tom@741: deskriptoren.beschreibung, tom@741: deskriptoren.sn tom@741: FROM deskriptoren tom@741: WHERE (deskriptoren.ebene = 10); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_11_s_01_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_11_s_01_view AS tom@741: SELECT d1.s_xx AS s01, tom@741: d2.s_xx AS s11 tom@741: FROM (deskriptoren d1 tom@741: JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) tom@741: WHERE (d2.ebene = 11); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_11_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_11_view AS tom@741: SELECT DISTINCT deskriptoren.s_xx AS s11, tom@741: deskriptoren.bedeutung, tom@741: deskriptoren.beschreibung, tom@741: deskriptoren.sn tom@741: FROM deskriptoren tom@741: WHERE (deskriptoren.ebene = 11); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_12_s_01_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_12_s_01_view AS tom@741: SELECT d1.s_xx AS s01, tom@741: d2.s_xx AS s12 tom@741: FROM (deskriptoren d1 tom@741: JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) tom@741: WHERE (d2.ebene = 12); tom@741: tom@741: tom@741: -- tom@741: -- Name: s_12_view; Type: VIEW; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE VIEW s_12_view AS tom@741: SELECT DISTINCT deskriptoren.s_xx AS s12, tom@741: deskriptoren.bedeutung, tom@741: deskriptoren.beschreibung, tom@741: deskriptoren.sn tom@741: FROM deskriptoren tom@741: WHERE (deskriptoren.ebene = 12); tom@741: tom@741: tom@741: -- tom@741: -- Name: staat; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE staat ( tom@741: id integer NOT NULL, tom@741: staat character varying(50) NOT NULL, tom@741: hkl_id smallint NOT NULL, tom@741: staat_iso character varying(2) NOT NULL, tom@741: staat_kurz character varying(5), tom@741: eu character(1) DEFAULT NULL::bpchar, tom@741: koord_x_extern character varying(22), tom@741: koord_y_extern character varying(22), tom@741: kda_id integer tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: staat_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: CREATE SEQUENCE staat_id_seq tom@741: START WITH 1 tom@741: INCREMENT BY 1 tom@741: NO MINVALUE tom@741: NO MAXVALUE tom@741: CACHE 1; tom@741: tom@741: tom@741: -- tom@741: -- Name: staat_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER SEQUENCE staat_id_seq OWNED BY staat.id; tom@741: tom@741: tom@741: -- raimund@751: -- Name: status_stufe; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: raimund@751: -- raimund@751: raimund@751: CREATE TABLE status_stufe ( raimund@751: id integer NOT NULL, raimund@751: stufe character varying(50) raimund@751: ); raimund@751: raimund@751: raimund@751: -- raimund@751: -- Name: status_wert; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: raimund@751: -- raimund@751: raimund@751: CREATE TABLE status_wert ( raimund@751: id integer NOT NULL, raimund@751: wert character varying(50) raimund@751: ); raimund@751: raimund@751: raimund@751: -- tom@741: -- Name: umwelt; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE umwelt ( tom@741: id character varying(3) NOT NULL, tom@741: beschreibung character varying(300), tom@741: umwelt_bereich character varying(80) NOT NULL, tom@741: meh_id integer tom@741: ); tom@741: tom@741: tom@741: -- tom@741: -- Name: verwaltungseinheit; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE TABLE verwaltungseinheit ( tom@741: id character varying(8) NOT NULL, tom@741: bundesland character varying(8) NOT NULL, tom@741: kda_id integer, tom@741: kreis character varying(8), tom@741: nuts character varying(10), tom@741: regbezirk character varying(8), tom@741: bezeichnung character varying(80) NOT NULL, tom@741: is_bundesland character(1) NOT NULL, tom@741: is_gemeinde character(1) NOT NULL, tom@741: is_landkreis character(1) NOT NULL, tom@741: is_regbezirk character(1) NOT NULL, tom@741: koord_x_extern character varying(22), tom@741: koord_y_extern character varying(22), tom@741: plz character varying(6), tom@741: longitude double precision, tom@741: latitude double precision tom@741: ); tom@741: tom@741: tom@741: SET search_path = bund, pg_catalog; tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY kommentar_m ALTER COLUMN id SET DEFAULT nextval('kommentar_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: datum; Type: DEFAULT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY kommentar_m ALTER COLUMN datum SET DEFAULT now(); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY kommentar_p ALTER COLUMN id SET DEFAULT nextval('kommentar_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: datum; Type: DEFAULT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY kommentar_p ALTER COLUMN datum SET DEFAULT now(); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY list ALTER COLUMN id SET DEFAULT nextval('list_id_seq'::regclass); tom@741: tom@741: raimund@751: -- raimund@751: -- Name: id; Type: DEFAULT; Schema: bund; Owner: - raimund@751: -- raimund@751: raimund@751: ALTER TABLE ONLY status_protokoll ALTER COLUMN id SET DEFAULT nextval('kommentar_id_seq'::regclass); raimund@751: raimund@751: raimund@751: -- raimund@751: -- Name: datum; Type: DEFAULT; Schema: bund; Owner: - raimund@751: -- raimund@751: raimund@751: ALTER TABLE ONLY status_protokoll ALTER COLUMN datum SET DEFAULT now(); raimund@751: raimund@751: tom@741: SET search_path = land, pg_catalog; tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY kommentar_m ALTER COLUMN id SET DEFAULT nextval('bund.kommentar_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: datum; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY kommentar_m ALTER COLUMN datum SET DEFAULT now(); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY kommentar_p ALTER COLUMN id SET DEFAULT nextval('bund.kommentar_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: datum; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY kommentar_p ALTER COLUMN datum SET DEFAULT now(); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messprogramm ALTER COLUMN id SET DEFAULT nextval('messprogramm_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messprogramm_mmt ALTER COLUMN id SET DEFAULT nextval('messprogramm_mmt_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messung ALTER COLUMN id SET DEFAULT nextval('bund.messung_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: fertig; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messung ALTER COLUMN fertig SET DEFAULT false; tom@741: tom@741: tom@741: -- tom@741: -- Name: letzte_aenderung; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messung ALTER COLUMN letzte_aenderung SET DEFAULT now(); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messung_translation ALTER COLUMN id SET DEFAULT nextval('messung_translation_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messwert ALTER COLUMN id SET DEFAULT nextval('bund.messwert_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: grenzwertueberschreitung; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messwert ALTER COLUMN grenzwertueberschreitung SET DEFAULT false; tom@741: tom@741: tom@741: -- tom@741: -- Name: letzte_aenderung; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messwert ALTER COLUMN letzte_aenderung SET DEFAULT now(); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY ort ALTER COLUMN id SET DEFAULT nextval('bund.ort_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: letzte_aenderung; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY ort ALTER COLUMN letzte_aenderung SET DEFAULT now(); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY probe ALTER COLUMN id SET DEFAULT nextval('bund.probe_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: test; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY probe ALTER COLUMN test SET DEFAULT false; tom@741: tom@741: tom@741: -- tom@741: -- Name: letzte_aenderung; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY probe ALTER COLUMN letzte_aenderung SET DEFAULT now(); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY probe_translation ALTER COLUMN id SET DEFAULT nextval('probe_translation_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: raimund@751: ALTER TABLE ONLY status_protokoll ALTER COLUMN id SET DEFAULT nextval('bund.kommentar_id_seq'::regclass); raimund@751: raimund@751: raimund@751: -- raimund@751: -- Name: datum; Type: DEFAULT; Schema: land; Owner: - raimund@751: -- raimund@751: raimund@751: ALTER TABLE ONLY status_protokoll ALTER COLUMN datum SET DEFAULT now(); raimund@751: raimund@751: raimund@751: -- raimund@751: -- Name: tree_modified; Type: DEFAULT; Schema: land; Owner: - raimund@751: -- raimund@751: raimund@751: ALTER TABLE ONLY status_protokoll ALTER COLUMN tree_modified SET DEFAULT now(); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY zusatz_wert ALTER COLUMN id SET DEFAULT nextval('bund.zusatz_wert_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: letzte_aenderung; Type: DEFAULT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY zusatz_wert ALTER COLUMN letzte_aenderung SET DEFAULT now(); tom@741: tom@741: tom@741: SET search_path = stammdaten, pg_catalog; tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY auth ALTER COLUMN id SET DEFAULT nextval('auth_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY datenbasis ALTER COLUMN id SET DEFAULT nextval('datenbasis_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY de_vg ALTER COLUMN id SET DEFAULT nextval('de_vg_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY deskriptoren ALTER COLUMN id SET DEFAULT nextval('deskriptoren_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY koordinaten_art ALTER COLUMN id SET DEFAULT nextval('koordinaten_art_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY mess_einheit ALTER COLUMN id SET DEFAULT nextval('mess_einheit_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messgroesse ALTER COLUMN id SET DEFAULT nextval('messgroesse_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messgroessen_gruppe ALTER COLUMN id SET DEFAULT nextval('messgroessen_gruppe_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY ort ALTER COLUMN id SET DEFAULT nextval('ort_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY pflicht_messgroesse ALTER COLUMN id SET DEFAULT nextval('pflicht_messgroesse_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY probenart ALTER COLUMN id SET DEFAULT nextval('probenart_id_seq'::regclass); tom@741: tom@741: tom@741: -- tom@741: -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY staat ALTER COLUMN id SET DEFAULT nextval('staat_id_seq'::regclass); tom@741: tom@741: tom@741: SET search_path = bund, pg_catalog; tom@741: tom@741: -- tom@741: -- Name: kommentar_pkey; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY kommentar tom@741: ADD CONSTRAINT kommentar_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: list_pkey; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY list tom@741: ADD CONSTRAINT list_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messung_pkey; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messung tom@741: ADD CONSTRAINT messung_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messwert_messungs_id_messgroesse_id_key; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messwert tom@741: ADD CONSTRAINT messwert_messungs_id_messgroesse_id_key UNIQUE (messungs_id, messgroesse_id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messwert_pkey; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messwert tom@741: ADD CONSTRAINT messwert_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: ort_pkey; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY ort tom@741: ADD CONSTRAINT ort_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: probe_pkey; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY probe tom@741: ADD CONSTRAINT probe_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- raimund@751: -- Name: status_protokoll_pkey; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: raimund@751: -- raimund@751: raimund@751: ALTER TABLE ONLY status_protokoll raimund@751: ADD CONSTRAINT status_protokoll_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: zusatz_wert_pkey; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY zusatz_wert tom@741: ADD CONSTRAINT zusatz_wert_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: zusatz_wert_probe_id_pzs_id_key; Type: CONSTRAINT; Schema: bund; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY zusatz_wert tom@741: ADD CONSTRAINT zusatz_wert_probe_id_pzs_id_key UNIQUE (probe_id, pzs_id); tom@741: tom@741: tom@741: SET search_path = land, pg_catalog; tom@741: tom@741: -- tom@741: -- Name: kommentar_m_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY kommentar_m tom@741: ADD CONSTRAINT kommentar_m_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: kommentar_p_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY kommentar_p tom@741: ADD CONSTRAINT kommentar_p_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messprogramm_mmt_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messprogramm_mmt tom@741: ADD CONSTRAINT messprogramm_mmt_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messprogramm_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messprogramm tom@741: ADD CONSTRAINT messprogramm_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messung_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messung tom@741: ADD CONSTRAINT messung_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messung_translation_messungs_id_key; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messung_translation tom@741: ADD CONSTRAINT messung_translation_messungs_id_key UNIQUE (messungs_id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messung_translation_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messung_translation tom@741: ADD CONSTRAINT messung_translation_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messwert_messungs_id_messgroesse_id_key; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messwert tom@741: ADD CONSTRAINT messwert_messungs_id_messgroesse_id_key UNIQUE (messungs_id, messgroesse_id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messwert_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messwert tom@741: ADD CONSTRAINT messwert_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: ort_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY ort tom@741: ADD CONSTRAINT ort_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: probe_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY probe tom@741: ADD CONSTRAINT probe_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: probe_translation_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY probe_translation tom@741: ADD CONSTRAINT probe_translation_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: probe_translation_probe_id_key; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY probe_translation tom@741: ADD CONSTRAINT probe_translation_probe_id_key UNIQUE (probe_id); tom@741: tom@741: tom@741: -- raimund@751: -- Name: status_protokoll_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: raimund@751: -- raimund@751: raimund@751: ALTER TABLE ONLY status_protokoll raimund@751: ADD CONSTRAINT status_protokoll_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: zusatz_wert_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY zusatz_wert tom@741: ADD CONSTRAINT zusatz_wert_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: zusatz_wert_probe_id_pzs_id_key; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY zusatz_wert tom@741: ADD CONSTRAINT zusatz_wert_probe_id_pzs_id_key UNIQUE (probe_id, pzs_id); tom@741: tom@741: tom@741: SET search_path = stammdaten, pg_catalog; tom@741: tom@741: -- tom@741: -- Name: auth_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY auth tom@741: ADD CONSTRAINT auth_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: datenbasis_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY datenbasis tom@741: ADD CONSTRAINT datenbasis_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: de_vg_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY de_vg tom@741: ADD CONSTRAINT de_vg_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: deskriptor_umwelt_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY deskriptor_umwelt tom@741: ADD CONSTRAINT deskriptor_umwelt_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: koordinaten_art_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY koordinaten_art tom@741: ADD CONSTRAINT koordinaten_art_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: mess_einheit_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY mess_einheit tom@741: ADD CONSTRAINT mess_einheit_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: mess_methode_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY mess_methode tom@741: ADD CONSTRAINT mess_methode_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: mess_stelle_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY mess_stelle tom@741: ADD CONSTRAINT mess_stelle_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messgroesse_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messgroesse tom@741: ADD CONSTRAINT messgroesse_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messgroessen_gruppe_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messgroessen_gruppe tom@741: ADD CONSTRAINT messgroessen_gruppe_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: mg_grp_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY mg_grp tom@741: ADD CONSTRAINT mg_grp_pkey PRIMARY KEY (messgroessengruppe_id, messgroesse_id); tom@741: tom@741: tom@741: -- tom@741: -- Name: mmt_messgroesse_grp_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY mmt_messgroesse_grp tom@741: ADD CONSTRAINT mmt_messgroesse_grp_pkey PRIMARY KEY (messgroessengruppe_id, mmt_id); tom@741: tom@741: tom@741: -- tom@741: -- Name: netz_betreiber_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY netz_betreiber tom@741: ADD CONSTRAINT netz_betreiber_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: ort_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY ort tom@741: ADD CONSTRAINT ort_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: pflicht_messgroesse_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY pflicht_messgroesse tom@741: ADD CONSTRAINT pflicht_messgroesse_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: pk_deskriptoren; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY deskriptoren tom@741: ADD CONSTRAINT pk_deskriptoren PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: proben_zusatz_eudf_keyword_key; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY proben_zusatz tom@741: ADD CONSTRAINT proben_zusatz_eudf_keyword_key UNIQUE (eudf_keyword); tom@741: tom@741: tom@741: -- tom@741: -- Name: proben_zusatz_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY proben_zusatz tom@741: ADD CONSTRAINT proben_zusatz_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: probenart_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY probenart tom@741: ADD CONSTRAINT probenart_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: staat_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY staat tom@741: ADD CONSTRAINT staat_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- raimund@751: -- Name: status_stufe_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: raimund@751: -- raimund@751: raimund@751: ALTER TABLE ONLY status_stufe raimund@751: ADD CONSTRAINT status_stufe_pkey PRIMARY KEY (id); raimund@751: raimund@751: raimund@751: -- raimund@751: -- Name: status_wert_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: raimund@751: -- raimund@751: raimund@751: ALTER TABLE ONLY status_wert raimund@751: ADD CONSTRAINT status_wert_pkey PRIMARY KEY (id); raimund@751: raimund@751: raimund@751: -- tom@741: -- Name: umwelt_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY umwelt tom@741: ADD CONSTRAINT umwelt_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: umwelt_umwelt_bereich_key; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY umwelt tom@741: ADD CONSTRAINT umwelt_umwelt_bereich_key UNIQUE (umwelt_bereich); tom@741: tom@741: tom@741: -- tom@741: -- Name: verwaltungseinheit_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: ALTER TABLE ONLY verwaltungseinheit tom@741: ADD CONSTRAINT verwaltungseinheit_pkey PRIMARY KEY (id); tom@741: tom@741: tom@741: SET search_path = bund, pg_catalog; tom@741: tom@741: -- tom@741: -- Name: p_list_zuord1; Type: INDEX; Schema: bund; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE INDEX p_list_zuord1 ON list_zuordnung USING btree (list_id); tom@741: tom@741: tom@741: -- tom@741: -- Name: p_list_zuord2; Type: INDEX; Schema: bund; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE INDEX p_list_zuord2 ON list_zuordnung USING hash (list_id); tom@741: tom@741: tom@741: SET search_path = land, pg_catalog; tom@741: tom@741: -- tom@741: -- Name: messung_probe_id_idx; Type: INDEX; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE INDEX messung_probe_id_idx ON messung USING btree (probe_id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messung_translation_messungs_id_idx; Type: INDEX; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE INDEX messung_translation_messungs_id_idx ON messung_translation USING btree (messungs_id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messwert_messungs_id_idx; Type: INDEX; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE INDEX messwert_messungs_id_idx ON messwert USING btree (messungs_id); tom@741: tom@741: tom@741: -- tom@741: -- Name: probe_id_idx; Type: INDEX; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE INDEX probe_id_idx ON probe USING btree (id); tom@741: tom@741: tom@741: -- tom@741: -- Name: probe_translation_probe_id_idx; Type: INDEX; Schema: land; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE INDEX probe_translation_probe_id_idx ON probe_translation USING btree (probe_id); tom@741: tom@741: tom@741: SET search_path = stammdaten, pg_catalog; tom@741: tom@741: -- tom@741: -- Name: de_vg_geom_gist; Type: INDEX; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE INDEX de_vg_geom_gist ON de_vg USING gist (geom); tom@741: tom@741: tom@741: -- tom@741: -- Name: fts_stauts_kooin10001; Type: INDEX; Schema: stammdaten; Owner: -; Tablespace: tom@741: -- tom@741: tom@741: CREATE INDEX fts_stauts_kooin10001 ON staat USING btree (kda_id); tom@741: tom@741: raimund@751: SET search_path = bund, pg_catalog; raimund@751: raimund@751: -- raimund@751: -- Name: tree_timestamp_status; Type: TRIGGER; Schema: bund; Owner: - raimund@751: -- raimund@751: raimund@751: CREATE TRIGGER tree_timestamp_status BEFORE UPDATE ON status_protokoll FOR EACH ROW EXECUTE PROCEDURE update_time_status(); raimund@751: raimund@751: tom@741: SET search_path = land, pg_catalog; tom@741: tom@741: -- tom@741: -- Name: tree_timestamp_messung; Type: TRIGGER; Schema: land; Owner: - tom@741: -- tom@741: tom@741: CREATE TRIGGER tree_timestamp_messung BEFORE UPDATE ON messung FOR EACH ROW EXECUTE PROCEDURE update_time_messung(); tom@741: tom@741: tom@741: -- tom@741: -- Name: tree_timestamp_messwert; Type: TRIGGER; Schema: land; Owner: - tom@741: -- tom@741: tom@741: CREATE TRIGGER tree_timestamp_messwert BEFORE UPDATE ON messwert FOR EACH ROW EXECUTE PROCEDURE update_time_messwert(); tom@741: tom@741: tom@741: -- tom@741: -- Name: tree_timestamp_ort; Type: TRIGGER; Schema: land; Owner: - tom@741: -- tom@741: tom@741: CREATE TRIGGER tree_timestamp_ort BEFORE UPDATE ON ort FOR EACH ROW EXECUTE PROCEDURE update_time_ort(); tom@741: tom@741: tom@741: -- tom@741: -- Name: tree_timestamp_probe; Type: TRIGGER; Schema: land; Owner: - tom@741: -- tom@741: tom@741: CREATE TRIGGER tree_timestamp_probe BEFORE UPDATE ON probe FOR EACH ROW EXECUTE PROCEDURE update_time_probe(); tom@741: tom@741: tom@741: -- tom@741: -- Name: tree_timestamp_zusatzwert; Type: TRIGGER; Schema: land; Owner: - tom@741: -- tom@741: tom@741: CREATE TRIGGER tree_timestamp_zusatzwert BEFORE UPDATE ON zusatz_wert FOR EACH ROW EXECUTE PROCEDURE update_time_zusatzwert(); tom@741: tom@741: tom@741: SET search_path = bund, pg_catalog; tom@741: tom@741: -- tom@741: -- Name: kommentar_m_messungs_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY kommentar_m tom@741: ADD CONSTRAINT kommentar_m_messungs_id_fkey FOREIGN KEY (messungs_id) REFERENCES messung(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: kommentar_p_probe_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY kommentar_p tom@741: ADD CONSTRAINT kommentar_p_probe_id_fkey FOREIGN KEY (probe_id) REFERENCES probe(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messung_mmt_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messung tom@741: ADD CONSTRAINT messung_mmt_id_fkey FOREIGN KEY (mmt_id) REFERENCES stammdaten.mess_methode(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messung_probe_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messung tom@741: ADD CONSTRAINT messung_probe_id_fkey FOREIGN KEY (probe_id) REFERENCES probe(id); tom@741: tom@741: tom@741: -- raimund@751: -- Name: messung_status_protokoll_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - raimund@751: -- raimund@751: raimund@751: ALTER TABLE ONLY messung raimund@751: ADD CONSTRAINT messung_status_protokoll_id_fkey FOREIGN KEY (status) REFERENCES status_protokoll(id); raimund@751: raimund@751: raimund@751: -- tom@741: -- Name: messwert_meh_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messwert tom@741: ADD CONSTRAINT messwert_meh_id_fkey FOREIGN KEY (meh_id) REFERENCES stammdaten.mess_einheit(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messwert_messgroesse_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messwert tom@741: ADD CONSTRAINT messwert_messgroesse_id_fkey FOREIGN KEY (messgroesse_id) REFERENCES stammdaten.messgroesse(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messwert_messungs_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messwert tom@741: ADD CONSTRAINT messwert_messungs_id_fkey FOREIGN KEY (messungs_id) REFERENCES messung(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: ort_ort_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY ort tom@741: ADD CONSTRAINT ort_ort_id_fkey FOREIGN KEY (ort_id) REFERENCES stammdaten.ort(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: ort_probe_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY ort tom@741: ADD CONSTRAINT ort_probe_id_fkey FOREIGN KEY (probe_id) REFERENCES probe(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: probe_datenbasis_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY probe tom@741: ADD CONSTRAINT probe_datenbasis_id_fkey FOREIGN KEY (datenbasis_id) REFERENCES stammdaten.datenbasis(id); tom@741: tom@741: tom@741: -- raimund@751: -- Name: probe_labor_mst_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - raimund@751: -- raimund@751: raimund@751: ALTER TABLE ONLY probe raimund@751: ADD CONSTRAINT probe_labor_mst_id_fkey FOREIGN KEY (labor_mst_id) REFERENCES stammdaten.mess_stelle(id); raimund@751: raimund@751: raimund@751: -- tom@741: -- Name: probe_mst_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY probe tom@741: ADD CONSTRAINT probe_mst_id_fkey FOREIGN KEY (mst_id) REFERENCES stammdaten.mess_stelle(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: probe_netzbetreiber_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY probe tom@741: ADD CONSTRAINT probe_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES stammdaten.netz_betreiber(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: probe_probenart_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY probe tom@741: ADD CONSTRAINT probe_probenart_id_fkey FOREIGN KEY (probenart_id) REFERENCES stammdaten.probenart(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: probe_umw_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY probe tom@741: ADD CONSTRAINT probe_umw_id_fkey FOREIGN KEY (umw_id) REFERENCES stammdaten.umwelt(id); tom@741: tom@741: tom@741: -- raimund@751: -- Name: status_protokoll_status_stufe_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - raimund@751: -- raimund@751: raimund@751: ALTER TABLE ONLY status_protokoll raimund@751: ADD CONSTRAINT status_protokoll_status_stufe_fkey FOREIGN KEY (status_stufe) REFERENCES stammdaten.status_stufe(id); raimund@751: raimund@751: raimund@751: -- raimund@751: -- Name: status_protokoll_status_wert_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - raimund@751: -- raimund@751: raimund@751: ALTER TABLE ONLY status_protokoll raimund@751: ADD CONSTRAINT status_protokoll_status_wert_fkey FOREIGN KEY (status_wert) REFERENCES stammdaten.status_wert(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: zusatz_wert_probe_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY zusatz_wert tom@741: ADD CONSTRAINT zusatz_wert_probe_id_fkey FOREIGN KEY (probe_id) REFERENCES probe(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: zusatz_wert_pzs_id_fkey; Type: FK CONSTRAINT; Schema: bund; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY zusatz_wert tom@741: ADD CONSTRAINT zusatz_wert_pzs_id_fkey FOREIGN KEY (pzs_id) REFERENCES stammdaten.proben_zusatz(id); tom@741: tom@741: tom@741: SET search_path = land, pg_catalog; tom@741: tom@741: -- tom@741: -- Name: kommentar_m_messungs_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY kommentar_m tom@741: ADD CONSTRAINT kommentar_m_messungs_id_fkey FOREIGN KEY (messungs_id) REFERENCES messung(id) ON DELETE CASCADE; tom@741: tom@741: tom@741: -- tom@741: -- Name: kommentar_p_probe_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY kommentar_p tom@741: ADD CONSTRAINT kommentar_p_probe_id_fkey FOREIGN KEY (probe_id) REFERENCES probe(id) ON DELETE CASCADE; tom@741: tom@741: tom@741: -- tom@741: -- Name: messprogramm_datenbasis_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messprogramm tom@741: ADD CONSTRAINT messprogramm_datenbasis_id_fkey FOREIGN KEY (datenbasis_id) REFERENCES stammdaten.datenbasis(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messprogramm_mmt_messprogramm_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messprogramm_mmt tom@741: ADD CONSTRAINT messprogramm_mmt_messprogramm_id_fkey FOREIGN KEY (messprogramm_id) REFERENCES messprogramm(id) ON DELETE CASCADE; tom@741: tom@741: tom@741: -- tom@741: -- Name: messprogramm_mmt_mmt_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messprogramm_mmt tom@741: ADD CONSTRAINT messprogramm_mmt_mmt_id_fkey FOREIGN KEY (mmt_id) REFERENCES stammdaten.mess_methode(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messprogramm_mst_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messprogramm tom@741: ADD CONSTRAINT messprogramm_mst_id_fkey FOREIGN KEY (mst_id) REFERENCES stammdaten.mess_stelle(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messprogramm_netzbetreiber_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messprogramm tom@741: ADD CONSTRAINT messprogramm_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES stammdaten.netz_betreiber(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messprogramm_ort_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messprogramm tom@741: ADD CONSTRAINT messprogramm_ort_id_fkey FOREIGN KEY (ort_id) REFERENCES stammdaten.ort(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messprogramm_probenart_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messprogramm tom@741: ADD CONSTRAINT messprogramm_probenart_id_fkey FOREIGN KEY (probenart_id) REFERENCES stammdaten.probenart(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messprogramm_umw_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messprogramm tom@741: ADD CONSTRAINT messprogramm_umw_id_fkey FOREIGN KEY (umw_id) REFERENCES stammdaten.umwelt(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messung_mmt_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messung tom@741: ADD CONSTRAINT messung_mmt_id_fkey FOREIGN KEY (mmt_id) REFERENCES stammdaten.mess_methode(id) ON DELETE CASCADE; tom@741: tom@741: tom@741: -- tom@741: -- Name: messung_probe_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messung tom@741: ADD CONSTRAINT messung_probe_id_fkey FOREIGN KEY (probe_id) REFERENCES probe(id) ON DELETE CASCADE; tom@741: tom@741: tom@741: -- raimund@751: -- Name: messung_status_protokoll_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - raimund@751: -- raimund@751: raimund@751: ALTER TABLE ONLY messung raimund@751: ADD CONSTRAINT messung_status_protokoll_id_fkey FOREIGN KEY (status) REFERENCES status_protokoll(id); raimund@751: raimund@751: raimund@751: -- tom@741: -- Name: messung_translation_messungs_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messung_translation tom@741: ADD CONSTRAINT messung_translation_messungs_id_fkey FOREIGN KEY (messungs_id) REFERENCES messung(id) ON DELETE CASCADE; tom@741: tom@741: tom@741: -- tom@741: -- Name: messwert_meh_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messwert tom@741: ADD CONSTRAINT messwert_meh_id_fkey FOREIGN KEY (meh_id) REFERENCES stammdaten.mess_einheit(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messwert_messgroesse_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messwert tom@741: ADD CONSTRAINT messwert_messgroesse_id_fkey FOREIGN KEY (messgroesse_id) REFERENCES stammdaten.messgroesse(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: messwert_messungs_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY messwert tom@741: ADD CONSTRAINT messwert_messungs_id_fkey FOREIGN KEY (messungs_id) REFERENCES messung(id) ON DELETE CASCADE; tom@741: tom@741: tom@741: -- tom@741: -- Name: ort_ort_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY ort tom@741: ADD CONSTRAINT ort_ort_id_fkey FOREIGN KEY (ort_id) REFERENCES stammdaten.ort(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: ort_probe_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY ort tom@741: ADD CONSTRAINT ort_probe_id_fkey FOREIGN KEY (probe_id) REFERENCES probe(id) ON DELETE CASCADE; tom@741: tom@741: tom@741: -- tom@741: -- Name: probe_datenbasis_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY probe tom@741: ADD CONSTRAINT probe_datenbasis_id_fkey FOREIGN KEY (datenbasis_id) REFERENCES stammdaten.datenbasis(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: probe_mst_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY probe tom@741: ADD CONSTRAINT probe_mst_id_fkey FOREIGN KEY (mst_id) REFERENCES stammdaten.mess_stelle(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: probe_netzbetreiber_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY probe tom@741: ADD CONSTRAINT probe_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES stammdaten.netz_betreiber(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: probe_probenart_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY probe tom@741: ADD CONSTRAINT probe_probenart_id_fkey FOREIGN KEY (probenart_id) REFERENCES stammdaten.probenart(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: probe_translation_probe_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY probe_translation tom@741: ADD CONSTRAINT probe_translation_probe_id_fkey FOREIGN KEY (probe_id) REFERENCES probe(id) ON DELETE CASCADE; tom@741: tom@741: tom@741: -- tom@741: -- Name: probe_umw_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY probe tom@741: ADD CONSTRAINT probe_umw_id_fkey FOREIGN KEY (umw_id) REFERENCES stammdaten.umwelt(id); tom@741: tom@741: tom@741: -- raimund@751: -- Name: status_protokoll_messungs_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - raimund@751: -- raimund@751: raimund@751: ALTER TABLE ONLY status_protokoll raimund@751: ADD CONSTRAINT status_protokoll_messungs_id_fkey FOREIGN KEY (messungs_id) REFERENCES messung(id) ON DELETE CASCADE; tom@741: tom@741: tom@741: -- tom@741: -- Name: zusatz_wert_probe_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY zusatz_wert tom@741: ADD CONSTRAINT zusatz_wert_probe_id_fkey FOREIGN KEY (probe_id) REFERENCES probe(id) ON DELETE CASCADE; tom@741: tom@741: tom@741: -- tom@741: -- Name: zusatz_wert_pzs_id_fkey; Type: FK CONSTRAINT; Schema: land; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY zusatz_wert tom@741: ADD CONSTRAINT zusatz_wert_pzs_id_fkey FOREIGN KEY (pzs_id) REFERENCES stammdaten.proben_zusatz(id); tom@741: tom@741: tom@741: SET search_path = stammdaten, pg_catalog; tom@741: tom@741: -- tom@741: -- Name: auth_mst_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY auth tom@741: ADD CONSTRAINT auth_mst_id_fkey FOREIGN KEY (mst_id) REFERENCES mess_stelle(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: auth_netzbetreiber_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY auth tom@741: ADD CONSTRAINT auth_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES netz_betreiber(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: fk_deskriptoren_vorgaenger; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY deskriptoren tom@741: ADD CONSTRAINT fk_deskriptoren_vorgaenger FOREIGN KEY (vorgaenger) REFERENCES deskriptoren(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: ort_gem_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY ort tom@741: ADD CONSTRAINT ort_gem_id_fkey FOREIGN KEY (gem_id) REFERENCES verwaltungseinheit(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: ort_kda_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY ort tom@741: ADD CONSTRAINT ort_kda_id_fkey FOREIGN KEY (kda_id) REFERENCES koordinaten_art(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: ort_netzbetreiber_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY ort tom@741: ADD CONSTRAINT ort_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES netz_betreiber(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: ort_staat_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY ort tom@741: ADD CONSTRAINT ort_staat_id_fkey FOREIGN KEY (staat_id) REFERENCES staat(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: pflicht_messgroesse_datenbasis_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY pflicht_messgroesse tom@741: ADD CONSTRAINT pflicht_messgroesse_datenbasis_id_fkey FOREIGN KEY (datenbasis_id) REFERENCES datenbasis(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: pflicht_messgroesse_mmt_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY pflicht_messgroesse tom@741: ADD CONSTRAINT pflicht_messgroesse_mmt_id_fkey FOREIGN KEY (mmt_id) REFERENCES mess_methode(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: pflicht_messgroesse_umw_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY pflicht_messgroesse tom@741: ADD CONSTRAINT pflicht_messgroesse_umw_id_fkey FOREIGN KEY (umw_id) REFERENCES umwelt(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: proben_zusatz_meh_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY proben_zusatz tom@741: ADD CONSTRAINT proben_zusatz_meh_id_fkey FOREIGN KEY (meh_id) REFERENCES mess_einheit(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: staat_kda_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY staat tom@741: ADD CONSTRAINT staat_kda_id_fkey FOREIGN KEY (kda_id) REFERENCES koordinaten_art(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: umwelt_meh_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY umwelt tom@741: ADD CONSTRAINT umwelt_meh_id_fkey FOREIGN KEY (meh_id) REFERENCES mess_einheit(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: verwaltungseinheit_kda_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: - tom@741: -- tom@741: tom@741: ALTER TABLE ONLY verwaltungseinheit tom@741: ADD CONSTRAINT verwaltungseinheit_kda_id_fkey FOREIGN KEY (kda_id) REFERENCES koordinaten_art(id); tom@741: tom@741: tom@741: -- tom@741: -- Name: public; Type: ACL; Schema: -; Owner: - tom@741: -- tom@741: tom@741: REVOKE ALL ON SCHEMA public FROM PUBLIC; tom@741: REVOKE ALL ON SCHEMA public FROM postgres; tom@741: GRANT ALL ON SCHEMA public TO postgres; tom@741: GRANT ALL ON SCHEMA public TO PUBLIC; tom@741: tom@741: tom@741: -- tom@741: -- PostgreSQL database dump complete tom@741: -- tom@741: