Mercurial > lada > lada-server
comparison db_schema/stammdaten_schema.sql @ 1012:c739d08040d6 schema-update
Fixed names and typos.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Mon, 04 Jul 2016 11:31:31 +0200 |
parents | 302f800ba588 |
children | 48c07fc5d2d1 |
comparison
equal
deleted
inserted
replaced
1011:302f800ba588 | 1012:c739d08040d6 |
---|---|
131 id character varying(2) PRIMARY KEY, | 131 id character varying(2) PRIMARY KEY, |
132 netzbetreiber character varying(50), | 132 netzbetreiber character varying(50), |
133 idf_netzbetreiber character varying(1), | 133 idf_netzbetreiber character varying(1), |
134 is_bmn boolean DEFAULT false, | 134 is_bmn boolean DEFAULT false, |
135 mailverteiler character varying(512), | 135 mailverteiler character varying(512), |
136 aktiv boolean DEFAULT false, | 136 aktiv boolean DEFAULT false |
137 ); | 137 ); |
138 | 138 |
139 | 139 |
140 CREATE TABLE mess_stelle ( | 140 CREATE TABLE mess_stelle ( |
141 id character varying(5) PRIMARY KEY, | 141 id character varying(5) PRIMARY KEY, |
222 netzbetreiber_id character varying(2) NOT NULL REFERENCES netz_betreiber, | 222 netzbetreiber_id character varying(2) NOT NULL REFERENCES netz_betreiber, |
223 datensatz_erzeuger_id character varying(2) NOT NULL, | 223 datensatz_erzeuger_id character varying(2) NOT NULL, |
224 mst_id character varying(5) NOT NULL REFERENCES mess_stelle, | 224 mst_id character varying(5) NOT NULL REFERENCES mess_stelle, |
225 bezeichnung character varying(120) NOT NULL, | 225 bezeichnung character varying(120) NOT NULL, |
226 letzte_aenderung timestamp without time zone, | 226 letzte_aenderung timestamp without time zone, |
227 UNIQUE(da_erzeuger_id, netzbetreiber_id) | 227 UNIQUE(datensatz_erzeuger_id, netzbetreiber_id) |
228 ); | 228 ); |
229 CREATE TRIGGER letzte_aenderung_datensatz_erzeuger BEFORE UPDATE ON datensatz_erzeuger FOR EACH ROW EXECUTE PROCEDURE update_letzte_aenderung(); | 229 CREATE TRIGGER letzte_aenderung_datensatz_erzeuger BEFORE UPDATE ON datensatz_erzeuger FOR EACH ROW EXECUTE PROCEDURE update_letzte_aenderung(); |
230 | 230 |
231 ALTER SEQUENCE datensatz_erzeuger_id_seq OWNED BY datensatz_erzeuger.id; | 231 ALTER SEQUENCE datensatz_erzeuger_id_seq OWNED BY datensatz_erzeuger.id; |
232 | 232 |