Mercurial > lada > lada-server
changeset 996:f77a9e85b122 schema-update
Declare primary keys in tabel definition.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 01 Jul 2016 18:04:21 +0200 (2016-07-01) |
parents | c21d2e3c988a |
children | 1f23867d69e9 |
files | db_schema/lada_schema.sql |
diffstat | 1 files changed, 8 insertions(+), 64 deletions(-) [+] |
line wrap: on
line diff
--- a/db_schema/lada_schema.sql Fri Jul 01 18:00:29 2016 +0200 +++ b/db_schema/lada_schema.sql Fri Jul 01 18:04:21 2016 +0200 @@ -168,7 +168,7 @@ -- CREATE TABLE kommentar_m ( - id serial NOT NULL, + id serial PRIMARY KEY, erzeuger character varying(5) NOT NULL, datum timestamp without time zone DEFAULT now(), text character varying(1024), @@ -181,7 +181,7 @@ -- CREATE TABLE kommentar_p ( - id serial NOT NULL, + id serial PRIMARY KEY, erzeuger character varying(5) NOT NULL, datum timestamp without time zone DEFAULT now(), text character varying(1024), @@ -234,7 +234,7 @@ -- CREATE TABLE messprogramm_mmt ( - id serial NOT NULL, + id serial PRIMARY KEY, messprogramm_id integer NOT NULL, mmt_id character varying(2) NOT NULL, messgroessen integer[], @@ -248,7 +248,7 @@ -- CREATE TABLE messung ( - id serial NOT NULL, + id serial PRIMARY KEY, id_alt integer DEFAULT nextval('land.messung_messung_id_alt_seq'::regclass) NOT NULL, probe_id integer NOT NULL, nebenproben_nr character varying(10), @@ -268,7 +268,7 @@ -- CREATE TABLE messwert ( - id serial NOT NULL, + id serial PRIMARY KEY, messungs_id integer NOT NULL, messgroesse_id integer NOT NULL, messwert_nwg character varying(1), @@ -288,7 +288,7 @@ -- CREATE TABLE ortszuordnung ( - id serial NOT NULL, + id serial PRIMARY KEY, probe_id integer NOT NULL, ort_id bigint NOT NULL, ortszuordnung_typ character varying(1), @@ -416,7 +416,7 @@ -- CREATE TABLE status_protokoll ( - id serial NOT NULL, + id serial PRIMARY KEY, erzeuger character varying(5) NOT NULL, datum timestamp without time zone DEFAULT now(), text character varying(1024), @@ -432,7 +432,7 @@ -- CREATE TABLE zusatz_wert ( - id serial NOT NULL, + id serial PRIMARY KEY, probe_id integer NOT NULL, pzs_id character varying(3) NOT NULL, messwert_pzs double precision, @@ -522,38 +522,6 @@ -- --- Name: kommentar_m_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: --- - -ALTER TABLE ONLY kommentar_m - ADD CONSTRAINT kommentar_m_pkey PRIMARY KEY (id); - - --- --- Name: kommentar_p_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: --- - -ALTER TABLE ONLY kommentar_p - ADD CONSTRAINT kommentar_p_pkey PRIMARY KEY (id); - - --- --- Name: messprogramm_mmt_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: --- - -ALTER TABLE ONLY messprogramm_mmt - ADD CONSTRAINT messprogramm_mmt_pkey PRIMARY KEY (id); - - --- --- Name: messung_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: --- - -ALTER TABLE ONLY messung - ADD CONSTRAINT messung_pkey PRIMARY KEY (id); - - --- -- Name: messwert_messungs_id_messgroesse_id_key; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: -- @@ -562,38 +530,6 @@ -- --- Name: messwert_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: --- - -ALTER TABLE ONLY messwert - ADD CONSTRAINT messwert_pkey PRIMARY KEY (id); - - --- --- Name: ortszuordnung_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: --- - -ALTER TABLE ONLY ortszuordnung - ADD CONSTRAINT ortszuordnung_pkey PRIMARY KEY (id); - - --- --- Name: status_protokoll_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: --- - -ALTER TABLE ONLY status_protokoll - ADD CONSTRAINT status_protokoll_pkey PRIMARY KEY (id); - - --- --- Name: zusatz_wert_pkey; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: --- - -ALTER TABLE ONLY zusatz_wert - ADD CONSTRAINT zusatz_wert_pkey PRIMARY KEY (id); - - --- -- Name: zusatz_wert_probe_id_pzs_id_key; Type: CONSTRAINT; Schema: land; Owner: -; Tablespace: --