Mercurial > lada > lada-server
diff db_schema/stammdaten_schema.sql @ 1016:8912b6f1776d schema-update
Added inline FK constraints.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Mon, 04 Jul 2016 12:05:26 +0200 |
parents | 9f903c54141b |
children | dd86066d7515 |
line wrap: on
line diff
--- a/db_schema/stammdaten_schema.sql Mon Jul 04 12:04:50 2016 +0200 +++ b/db_schema/stammdaten_schema.sql Mon Jul 04 12:05:26 2016 +0200 @@ -118,14 +118,14 @@ eu character(1) DEFAULT NULL::bpchar, koord_x_extern character varying(22), koord_y_extern character varying(22), - kda_id integer + kda_id integer REFERENCES koordinaten_art ); CREATE TABLE verwaltungseinheit ( id character varying(8) PRIMARY KEY, bundesland character varying(8) NOT NULL, - kda_id integer, + kda_id integer REFERENCES koordinaten_art, kreis character varying(8), nuts character varying(10), regbezirk character varying(8), @@ -185,8 +185,8 @@ CREATE TABLE auth_lst_umw ( id serial PRIMARY KEY, - mst_id character varying(5), - umw_id character varying(3) + mst_id character varying(5) REFERENCES mess_stelle, + umw_id character varying(3) REFERENCES umwelt ); @@ -245,13 +245,13 @@ s10 integer, s11 integer, s12 integer, - umw_id character varying(3) NOT NULL + umw_id character varying(3) NOT NULL REFERENCES umwelt ); CREATE TABLE deskriptoren ( id serial PRIMARY KEY, - vorgaenger integer, + vorgaenger integer REFERENCES deskriptoren, ebene smallint, s_xx integer, sn smallint, @@ -338,14 +338,14 @@ CREATE TABLE mg_grp ( - messgroessengruppe_id integer NOT NULL, - messgroesse_id integer NOT NULL + messgroessengruppe_id integer NOT NULL REFERENCES messgroessen_gruppe, + messgroesse_id integer NOT NULL REFERENCES messgroesse ); CREATE TABLE mmt_messgroesse_grp ( - messgroessengruppe_id integer NOT NULL, - mmt_id character varying(2) NOT NULL + messgroessengruppe_id integer NOT NULL REFERENCES messgroessen_gruppe, + mmt_id character varying(2) NOT NULL REFERENCES mess_methode ); @@ -411,15 +411,15 @@ CREATE TABLE pflicht_messgroesse ( id serial PRIMARY KEY, messgroesse_id integer, - mmt_id character varying(2), - umw_id character varying(3), - datenbasis_id smallint NOT NULL + mmt_id character varying(2) REFERENCES mess_methode, + umw_id character varying(3) REFERENCES umwelt, + datenbasis_id smallint NOT NULL REFERENCES datenbasis ); CREATE TABLE proben_zusatz ( id character varying(3) PRIMARY KEY, - meh_id integer, + meh_id integer REFERENCES mess_einheit, beschreibung character varying(50) NOT NULL, zusatzwert character varying(7) NOT NULL, eudf_keyword character varying(40)