Mercurial > lada > lada-server
comparison db_schema/stammdaten_schema.sql @ 904:825d82b8ad6e
Set known mandatory fields in stammdaten NOT NULL.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Tue, 05 Apr 2016 10:29:55 +0200 |
parents | d465094946ef |
children | df2908334150 |
comparison
equal
deleted
inserted
replaced
903:685ced261ea4 | 904:825d82b8ad6e |
---|---|
210 CACHE 1; | 210 CACHE 1; |
211 | 211 |
212 CREATE TABLE datensatz_erzeuger ( | 212 CREATE TABLE datensatz_erzeuger ( |
213 id integer PRIMARY KEY | 213 id integer PRIMARY KEY |
214 DEFAULT nextval('datensatz_erzeuger_id_seq'::regclass), | 214 DEFAULT nextval('datensatz_erzeuger_id_seq'::regclass), |
215 netzbetreiber_id character varying(2) REFERENCES netz_betreiber, | 215 netzbetreiber_id character varying(2) NOT NULL REFERENCES netz_betreiber, |
216 da_erzeuger_id character varying(2), | 216 da_erzeuger_id character varying(2) NOT NULL, |
217 mst_id character varying(5) REFERENCES mess_stelle, | 217 mst_id character varying(5) NOT NULL REFERENCES mess_stelle, |
218 bezeichnung character varying(120), | 218 bezeichnung character varying(120) NOT NULL, |
219 letzte_aenderung timestamp without time zone | 219 letzte_aenderung timestamp without time zone |
220 ); | 220 ); |
221 | 221 |
222 ALTER SEQUENCE datensatz_erzeuger_id_seq OWNED BY datensatz_erzeuger.id; | 222 ALTER SEQUENCE datensatz_erzeuger_id_seq OWNED BY datensatz_erzeuger.id; |
223 | 223 |
445 CACHE 1; | 445 CACHE 1; |
446 | 446 |
447 CREATE TABLE messprogramm_kategorie ( | 447 CREATE TABLE messprogramm_kategorie ( |
448 id integer PRIMARY KEY | 448 id integer PRIMARY KEY |
449 DEFAULT nextval('messprogramm_kategorie_id_seq'::regclass), | 449 DEFAULT nextval('messprogramm_kategorie_id_seq'::regclass), |
450 netzbetreiber_id character varying(2) REFERENCES netz_betreiber, | 450 netzbetreiber_id character varying(2) NOT NULL REFERENCES netz_betreiber, |
451 mpl_id character varying(3), | 451 mpl_id character varying(3) NOT NULL, |
452 bezeichnung character varying(120), | 452 bezeichnung character varying(120) NOT NULL, |
453 letzte_aenderung timestamp without time zone | 453 letzte_aenderung timestamp without time zone |
454 ); | 454 ); |
455 | 455 |
456 ALTER SEQUENCE messprogramm_kategorie_id_seq | 456 ALTER SEQUENCE messprogramm_kategorie_id_seq |
457 OWNED BY messprogramm_kategorie.id; | 457 OWNED BY messprogramm_kategorie.id; |
491 CACHE 1; | 491 CACHE 1; |
492 | 492 |
493 CREATE TABLE ort ( | 493 CREATE TABLE ort ( |
494 id integer PRIMARY KEY DEFAULT nextval('ort_id_seq'::regclass), | 494 id integer PRIMARY KEY DEFAULT nextval('ort_id_seq'::regclass), |
495 netzbetreiber_id character varying(2) REFERENCES netz_betreiber, | 495 netzbetreiber_id character varying(2) REFERENCES netz_betreiber, |
496 ort_id character varying(10), | 496 ort_id character varying(10) NOT NULL, |
497 langtext character varying(100), | 497 langtext character varying(100) NOT NULL, |
498 staat_id smallint REFERENCES staat, | 498 staat_id smallint NOT NULL REFERENCES staat, |
499 gem_id character varying(8) REFERENCES verwaltungseinheit, | 499 gem_id character varying(8) REFERENCES verwaltungseinheit, |
500 unscharf character(1) DEFAULT NULL::bpchar, | 500 unscharf character(1) DEFAULT NULL::bpchar, |
501 nuts_code character varying(10), | 501 nuts_code character varying(10), |
502 kda_id integer REFERENCES koordinaten_art, | 502 kda_id integer NOT NULL REFERENCES koordinaten_art, |
503 koord_x_extern character varying(22), | 503 koord_x_extern character varying(22) NOT NULL, |
504 koord_y_extern character varying(22), | 504 koord_y_extern character varying(22) NOT NULL, |
505 hoehe_land real, | 505 hoehe_land real, |
506 letzte_aenderung timestamp without time zone DEFAULT now(), | 506 letzte_aenderung timestamp without time zone DEFAULT now(), |
507 latitude double precision, | 507 latitude double precision, |
508 longitude double precision, | 508 longitude double precision, |
509 geom public.geometry(Point,4326), | 509 geom public.geometry(Point,4326), |
510 shape public.geometry(MultiPolygon,4326), | 510 shape public.geometry(MultiPolygon,4326), |
511 ort_typ smallint REFERENCES ort_typ, | 511 ort_typ smallint REFERENCES ort_typ, |
512 kurztext character varying(15), | 512 kurztext character varying(15) NOT NULL, |
513 berichtstext character varying(70), | 513 berichtstext character varying(70), |
514 zone character varying(1), | 514 zone character varying(1), |
515 sektor character varying(2), | 515 sektor character varying(2), |
516 zustaendigkeit character varying(10), | 516 zustaendigkeit character varying(10), |
517 mp_art character varying(10), | 517 mp_art character varying(10), |
587 NO MAXVALUE | 587 NO MAXVALUE |
588 CACHE 1; | 588 CACHE 1; |
589 | 589 |
590 CREATE TABLE probenehmer ( | 590 CREATE TABLE probenehmer ( |
591 id integer PRIMARY KEY DEFAULT nextval('probenehmer_id_seq'::regclass), | 591 id integer PRIMARY KEY DEFAULT nextval('probenehmer_id_seq'::regclass), |
592 netzbetreiber_id character varying(2) REFERENCES netz_betreiber, | 592 netzbetreiber_id character varying(2) NOT NULL REFERENCES netz_betreiber, |
593 prn_id character varying(9), | 593 prn_id character varying(9) NOT NULL, |
594 bearbeiter character varying(25), | 594 bearbeiter character varying(25), |
595 bemerkung character varying(60), | 595 bemerkung character varying(60), |
596 betrieb character varying(80), | 596 betrieb character varying(80), |
597 bezeichnung character varying(80), | 597 bezeichnung character varying(80) NOT NULL, |
598 kurz_bezeichnung character varying(10), | 598 kurz_bezeichnung character varying(10) NOT NULL, |
599 ort character varying(20), | 599 ort character varying(20), |
600 plz character varying(5), | 600 plz character varying(5), |
601 strasse character varying(30), | 601 strasse character varying(30), |
602 telefon character varying(20), | 602 telefon character varying(20), |
603 tp character varying(3), | 603 tp character varying(3), |