comparison db_schema/stammdaten_schema.sql @ 868:6cefa1468832

Use inline primary key definitions and remove autogenerated comments.
author Tom Gottfried <tom@intevation.de>
date Fri, 05 Feb 2016 18:32:03 +0100
parents 66069d69d6ee
children fc8349057de1
comparison
equal deleted inserted replaced
867:66069d69d6ee 868:6cefa1468832
75 return (result); 75 return (result);
76 end; 76 end;
77 $$; 77 $$;
78 78
79 79
80 CREATE SEQUENCE auth_id_seq
81 START WITH 1
82 INCREMENT BY 1
83 NO MINVALUE
84 NO MAXVALUE
85 CACHE 1;
86
80 CREATE TABLE auth ( 87 CREATE TABLE auth (
81 id integer NOT NULL, 88 id integer PRIMARY KEY DEFAULT nextval('auth_id_seq'::regclass),
82 ldap_group character varying(40) NOT NULL, 89 ldap_group character varying(40) NOT NULL,
83 netzbetreiber_id character varying(2), 90 netzbetreiber_id character varying(2),
84 mst_id character varying(5), 91 mst_id character varying(5),
85 labor_mst_id character varying(5), 92 labor_mst_id character varying(5),
86 funktion_id smallint 93 funktion_id smallint
87 ); 94 );
88 95
89 96 ALTER SEQUENCE auth_id_seq OWNED BY auth.id;
90 -- 97
91 -- Name: auth_funktion; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace:
92 --
93 98
94 CREATE TABLE auth_funktion ( 99 CREATE TABLE auth_funktion (
95 id smallint NOT NULL, 100 id smallint PRIMARY KEY,
96 funktion character varying(40) 101 funktion character varying(40)
97 ); 102 );
98 103
99 104
100 -- 105 CREATE SEQUENCE auth_lst_umw_id_seq
101 -- Name: auth_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: - 106 START WITH 1
102 -- 107 INCREMENT BY 1
103 108 NO MINVALUE
104 CREATE SEQUENCE auth_id_seq 109 NO MAXVALUE
105 START WITH 1 110 CACHE 1;
106 INCREMENT BY 1
107 NO MINVALUE
108 NO MAXVALUE
109 CACHE 1;
110
111
112 --
113 -- Name: auth_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
114 --
115
116 ALTER SEQUENCE auth_id_seq OWNED BY auth.id;
117
118
119 --
120 -- Name: auth_id_seq1; Type: SEQUENCE; Schema: stammdaten; Owner: -
121 --
122
123 CREATE SEQUENCE auth_id_seq1
124 START WITH 1
125 INCREMENT BY 1
126 NO MINVALUE
127 NO MAXVALUE
128 CACHE 1;
129
130
131 --
132 -- Name: auth_id_seq1; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
133 --
134
135 ALTER SEQUENCE auth_id_seq1 OWNED BY auth.id;
136
137
138 --
139 -- Name: auth_lst_umw; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace:
140 --
141 111
142 CREATE TABLE auth_lst_umw ( 112 CREATE TABLE auth_lst_umw (
143 id integer NOT NULL, 113 id integer PRIMARY KEY DEFAULT nextval('auth_lst_umw_id_seq'::regclass),
144 lst_id character varying(5), 114 lst_id character varying(5),
145 umw_id character varying(3) 115 umw_id character varying(3)
146 ); 116 );
147 117
148
149 --
150 -- Name: auth_lst_umw_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: -
151 --
152
153 CREATE SEQUENCE auth_lst_umw_id_seq
154 START WITH 1
155 INCREMENT BY 1
156 NO MINVALUE
157 NO MAXVALUE
158 CACHE 1;
159
160
161 --
162 -- Name: auth_lst_umw_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
163 --
164
165 ALTER SEQUENCE auth_lst_umw_id_seq OWNED BY auth_lst_umw.id; 118 ALTER SEQUENCE auth_lst_umw_id_seq OWNED BY auth_lst_umw.id;
166 119
167 120
168 -- 121 CREATE SEQUENCE datenbasis_id_seq
169 -- Name: datenbasis; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: 122 START WITH 1
170 -- 123 INCREMENT BY 1
124 NO MINVALUE
125 NO MAXVALUE
126 CACHE 1;
171 127
172 CREATE TABLE datenbasis ( 128 CREATE TABLE datenbasis (
173 id integer NOT NULL, 129 id integer PRIMARY KEY DEFAULT nextval('datenbasis_id_seq'::regclass),
174 beschreibung character varying(30), 130 beschreibung character varying(30),
175 datenbasis character varying(6) 131 datenbasis character varying(6)
176 ); 132 );
177 133
178
179 --
180 -- Name: datenbasis_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: -
181 --
182
183 CREATE SEQUENCE datenbasis_id_seq
184 START WITH 1
185 INCREMENT BY 1
186 NO MINVALUE
187 NO MAXVALUE
188 CACHE 1;
189
190
191 --
192 -- Name: datenbasis_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
193 --
194
195 ALTER SEQUENCE datenbasis_id_seq OWNED BY datenbasis.id; 134 ALTER SEQUENCE datenbasis_id_seq OWNED BY datenbasis.id;
196 135
197 136
198 -- 137 CREATE SEQUENCE datensatz_erzeuger_id_seq
199 -- Name: datensatz_erzeuger; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: 138 START WITH 1
200 -- 139 INCREMENT BY 1
140 NO MINVALUE
141 NO MAXVALUE
142 CACHE 1;
201 143
202 CREATE TABLE datensatz_erzeuger ( 144 CREATE TABLE datensatz_erzeuger (
203 id integer NOT NULL, 145 id integer PRIMARY KEY
146 DEFAULT nextval('datensatz_erzeuger_id_seq'::regclass),
204 netzbetreiber_id character varying(2), 147 netzbetreiber_id character varying(2),
205 da_erzeuger_id character varying(2), 148 da_erzeuger_id character varying(2),
206 mst_id character varying(5), 149 mst_id character varying(5),
207 bezeichnung character varying(120), 150 bezeichnung character varying(120),
208 letzte_aenderung timestamp without time zone 151 letzte_aenderung timestamp without time zone
209 ); 152 );
210 153
211
212 --
213 -- Name: datensatz_erzeuger_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: -
214 --
215
216 CREATE SEQUENCE datensatz_erzeuger_id_seq
217 START WITH 1
218 INCREMENT BY 1
219 NO MINVALUE
220 NO MAXVALUE
221 CACHE 1;
222
223
224 --
225 -- Name: datensatz_erzeuger_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
226 --
227
228 ALTER SEQUENCE datensatz_erzeuger_id_seq OWNED BY datensatz_erzeuger.id; 154 ALTER SEQUENCE datensatz_erzeuger_id_seq OWNED BY datensatz_erzeuger.id;
229 155
230 156
231 -- 157 CREATE SEQUENCE de_vg_id_seq
232 -- Name: de_vg; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: 158 START WITH 1
233 -- 159 INCREMENT BY 1
160 NO MINVALUE
161 NO MAXVALUE
162 CACHE 1;
234 163
235 CREATE TABLE de_vg ( 164 CREATE TABLE de_vg (
236 id integer NOT NULL, 165 id integer PRIMARY KEY DEFAULT nextval('de_vg_id_seq'::regclass),
237 use double precision, 166 use double precision,
238 rs character varying(12), 167 rs character varying(12),
239 gf double precision, 168 gf double precision,
240 rau_rs character varying(12), 169 rau_rs character varying(12),
241 gen character varying(50), 170 gen character varying(50),
250 length numeric, 179 length numeric,
251 shape_area numeric, 180 shape_area numeric,
252 geom public.geometry(MultiPolygon,4326) 181 geom public.geometry(MultiPolygon,4326)
253 ); 182 );
254 183
255
256 --
257 -- Name: de_vg_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: -
258 --
259
260 CREATE SEQUENCE de_vg_id_seq
261 START WITH 1
262 INCREMENT BY 1
263 NO MINVALUE
264 NO MAXVALUE
265 CACHE 1;
266
267
268 --
269 -- Name: de_vg_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
270 --
271
272 ALTER SEQUENCE de_vg_id_seq OWNED BY de_vg.id; 184 ALTER SEQUENCE de_vg_id_seq OWNED BY de_vg.id;
273 185
274 186
275 --
276 -- Name: deskriptor_umwelt; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace:
277 --
278
279 CREATE TABLE deskriptor_umwelt ( 187 CREATE TABLE deskriptor_umwelt (
280 id integer NOT NULL, 188 id integer PRIMARY KEY,
281 s00 integer NOT NULL, 189 s00 integer NOT NULL,
282 s01 integer NOT NULL, 190 s01 integer NOT NULL,
283 s02 integer, 191 s02 integer,
284 s03 integer, 192 s03 integer,
285 s04 integer, 193 s04 integer,
293 s12 integer, 201 s12 integer,
294 umw_id character varying(3) NOT NULL 202 umw_id character varying(3) NOT NULL
295 ); 203 );
296 204
297 205
298 -- 206 CREATE SEQUENCE deskriptoren_id_seq
299 -- Name: deskriptoren; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: 207 START WITH 1
300 -- 208 INCREMENT BY 1
209 NO MINVALUE
210 NO MAXVALUE
211 CACHE 1;
301 212
302 CREATE TABLE deskriptoren ( 213 CREATE TABLE deskriptoren (
303 id integer NOT NULL, 214 id integer PRIMARY KEY DEFAULT nextval('deskriptoren_id_seq'::regclass),
304 vorgaenger integer, 215 vorgaenger integer,
305 ebene smallint, 216 ebene smallint,
306 s_xx integer, 217 s_xx integer,
307 sn smallint, 218 sn smallint,
308 beschreibung character varying(100), 219 beschreibung character varying(100),
309 bedeutung character varying(300) 220 bedeutung character varying(300)
310 ); 221 );
311 222
312
313 --
314 -- Name: deskriptoren_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: -
315 --
316
317 CREATE SEQUENCE deskriptoren_id_seq
318 START WITH 1
319 INCREMENT BY 1
320 NO MINVALUE
321 NO MAXVALUE
322 CACHE 1;
323
324
325 --
326 -- Name: deskriptoren_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
327 --
328
329 ALTER SEQUENCE deskriptoren_id_seq OWNED BY deskriptoren.id; 223 ALTER SEQUENCE deskriptoren_id_seq OWNED BY deskriptoren.id;
330 224
331 225
332 -- 226 CREATE SEQUENCE favorite_id_seq
333 -- Name: favorite; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: 227 START WITH 1
334 -- 228 INCREMENT BY 1
229 NO MINVALUE
230 NO MAXVALUE
231 CACHE 1;
335 232
336 CREATE TABLE favorite ( 233 CREATE TABLE favorite (
337 id integer NOT NULL, 234 id integer PRIMARY KEY DEFAULT nextval('favorite_id_seq'::regclass),
338 user_id integer NOT NULL, 235 user_id integer NOT NULL,
339 query_id integer NOT NULL 236 query_id integer NOT NULL
340 ); 237 );
341 238
342
343 --
344 -- Name: favorite_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: -
345 --
346
347 CREATE SEQUENCE favorite_id_seq
348 START WITH 1
349 INCREMENT BY 1
350 NO MINVALUE
351 NO MAXVALUE
352 CACHE 1;
353
354
355 --
356 -- Name: favorite_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
357 --
358
359 ALTER SEQUENCE favorite_id_seq OWNED BY favorite.id; 239 ALTER SEQUENCE favorite_id_seq OWNED BY favorite.id;
360 240
361 241
362 -- 242 CREATE SEQUENCE filter_id_seq
363 -- Name: filter; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: 243 START WITH 1
364 -- 244 INCREMENT BY 1
245 NO MINVALUE
246 NO MAXVALUE
247 CACHE 1;
365 248
366 CREATE TABLE filter ( 249 CREATE TABLE filter (
367 id integer NOT NULL, 250 id integer PRIMARY KEY DEFAULT nextval('filter_id_seq'::regclass),
368 query_id integer NOT NULL, 251 query_id integer NOT NULL,
369 data_index character varying(50) NOT NULL, 252 data_index character varying(50) NOT NULL,
370 type character varying(10) NOT NULL, 253 type character varying(10) NOT NULL,
371 label character varying(50) NOT NULL, 254 label character varying(50) NOT NULL,
372 multiselect boolean 255 multiselect boolean
373 ); 256 );
374 257
375
376 --
377 -- Name: filter_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: -
378 --
379
380 CREATE SEQUENCE filter_id_seq
381 START WITH 1
382 INCREMENT BY 1
383 NO MINVALUE
384 NO MAXVALUE
385 CACHE 1;
386
387
388 --
389 -- Name: filter_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
390 --
391
392 ALTER SEQUENCE filter_id_seq OWNED BY filter.id; 258 ALTER SEQUENCE filter_id_seq OWNED BY filter.id;
393 259
394 260
395 -- 261 CREATE SEQUENCE filter_value_id_seq
396 -- Name: filter_value; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: 262 START WITH 1
397 -- 263 INCREMENT BY 1
264 NO MINVALUE
265 NO MAXVALUE
266 CACHE 1;
398 267
399 CREATE TABLE filter_value ( 268 CREATE TABLE filter_value (
400 id integer NOT NULL, 269 id integer PRIMARY KEY DEFAULT nextval('filter_value_id_seq'::regclass),
401 query_id integer NOT NULL, 270 query_id integer NOT NULL,
402 user_id integer NOT NULL, 271 user_id integer NOT NULL,
403 filter_id integer NOT NULL, 272 filter_id integer NOT NULL,
404 value text 273 value text
405 ); 274 );
406 275
407
408 --
409 -- Name: filter_value_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: -
410 --
411
412 CREATE SEQUENCE filter_value_id_seq
413 START WITH 1
414 INCREMENT BY 1
415 NO MINVALUE
416 NO MAXVALUE
417 CACHE 1;
418
419
420 --
421 -- Name: filter_value_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
422 --
423
424 ALTER SEQUENCE filter_value_id_seq OWNED BY filter_value.id; 276 ALTER SEQUENCE filter_value_id_seq OWNED BY filter_value.id;
425 277
426 278
427 -- 279 CREATE SEQUENCE koordinaten_art_id_seq
428 -- Name: koordinaten_art; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: 280 START WITH 1
429 -- 281 INCREMENT BY 1
282 NO MINVALUE
283 NO MAXVALUE
284 CACHE 1;
430 285
431 CREATE TABLE koordinaten_art ( 286 CREATE TABLE koordinaten_art (
432 id integer NOT NULL, 287 id integer PRIMARY KEY DEFAULT nextval('koordinaten_art_id_seq'::regclass),
433 koordinatenart character varying(50), 288 koordinatenart character varying(50),
434 idf_geo_key character varying(1) 289 idf_geo_key character varying(1)
435 ); 290 );
436 291
437
438 --
439 -- Name: koordinaten_art_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: -
440 --
441
442 CREATE SEQUENCE koordinaten_art_id_seq
443 START WITH 1
444 INCREMENT BY 1
445 NO MINVALUE
446 NO MAXVALUE
447 CACHE 1;
448
449
450 --
451 -- Name: koordinaten_art_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
452 --
453
454 ALTER SEQUENCE koordinaten_art_id_seq OWNED BY koordinaten_art.id; 292 ALTER SEQUENCE koordinaten_art_id_seq OWNED BY koordinaten_art.id;
455 293
456 294
457 -- 295 CREATE SEQUENCE lada_user_id_seq
458 -- Name: lada_user; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: 296 START WITH 1
459 -- 297 INCREMENT BY 1
298 NO MINVALUE
299 NO MAXVALUE
300 CACHE 1;
460 301
461 CREATE TABLE lada_user ( 302 CREATE TABLE lada_user (
462 id integer NOT NULL, 303 id integer PRIMARY KEY DEFAULT nextval('lada_user_id_seq'::regclass),
463 name character varying(80) NOT NULL 304 name character varying(80) NOT NULL
464 ); 305 );
465 306
466
467 --
468 -- Name: lada_user_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: -
469 --
470
471 CREATE SEQUENCE lada_user_id_seq
472 START WITH 1
473 INCREMENT BY 1
474 NO MINVALUE
475 NO MAXVALUE
476 CACHE 1;
477
478
479 --
480 -- Name: lada_user_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
481 --
482
483 ALTER SEQUENCE lada_user_id_seq OWNED BY lada_user.id; 307 ALTER SEQUENCE lada_user_id_seq OWNED BY lada_user.id;
484 308
485 309
486 -- 310 CREATE SEQUENCE mess_einheit_id_seq
487 -- Name: mess_einheit; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: 311 START WITH 1
488 -- 312 INCREMENT BY 1
313 NO MINVALUE
314 NO MAXVALUE
315 CACHE 1;
489 316
490 CREATE TABLE mess_einheit ( 317 CREATE TABLE mess_einheit (
491 id integer NOT NULL, 318 id integer PRIMARY KEY DEFAULT nextval('mess_einheit_id_seq'::regclass),
492 beschreibung character varying(50), 319 beschreibung character varying(50),
493 einheit character varying(12), 320 einheit character varying(12),
494 eudf_messeinheit_id character varying(8), 321 eudf_messeinheit_id character varying(8),
495 umrechnungs_faktor_eudf bigint 322 umrechnungs_faktor_eudf bigint
496 ); 323 );
497 324
498
499 --
500 -- Name: mess_einheit_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: -
501 --
502
503 CREATE SEQUENCE mess_einheit_id_seq
504 START WITH 1
505 INCREMENT BY 1
506 NO MINVALUE
507 NO MAXVALUE
508 CACHE 1;
509
510
511 --
512 -- Name: mess_einheit_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
513 --
514
515 ALTER SEQUENCE mess_einheit_id_seq OWNED BY mess_einheit.id; 325 ALTER SEQUENCE mess_einheit_id_seq OWNED BY mess_einheit.id;
516 326
517 327
518 --
519 -- Name: mess_methode; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace:
520 --
521
522 CREATE TABLE mess_methode ( 328 CREATE TABLE mess_methode (
523 id character varying(2) NOT NULL, 329 id character varying(2) PRIMARY KEY,
524 beschreibung character varying(300), 330 beschreibung character varying(300),
525 messmethode character varying(50) 331 messmethode character varying(50)
526 ); 332 );
527 333
528 334
529 --
530 -- Name: mess_stelle; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace:
531 --
532
533 CREATE TABLE mess_stelle ( 335 CREATE TABLE mess_stelle (
534 id character varying(5) NOT NULL, 336 id character varying(5) PRIMARY KEY,
535 netzbetreiber_id character varying(2), 337 netzbetreiber_id character varying(2),
536 beschreibung character varying(300), 338 beschreibung character varying(300),
537 mess_stelle character varying(60), 339 mess_stelle character varying(60),
538 mst_typ character varying(1), 340 mst_typ character varying(1),
539 amtskennung character varying(6) 341 amtskennung character varying(6)
540 ); 342 );
541 343
542 344
543 -- 345
544 -- Name: messgroesse; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: 346 CREATE SEQUENCE messgroesse_id_seq
545 -- 347 START WITH 1
348 INCREMENT BY 1
349 NO MINVALUE
350 NO MAXVALUE
351 CACHE 1;
546 352
547 CREATE TABLE messgroesse ( 353 CREATE TABLE messgroesse (
548 id integer NOT NULL, 354 id integer PRIMARY KEY DEFAULT nextval('messgroesse_id_seq'::regclass),
549 beschreibung character varying(300), 355 beschreibung character varying(300),
550 messgroesse character varying(50) NOT NULL, 356 messgroesse character varying(50) NOT NULL,
551 default_farbe character varying(9), 357 default_farbe character varying(9),
552 idf_nuklid_key character varying(6), 358 idf_nuklid_key character varying(6),
553 ist_leitnuklid boolean DEFAULT false, 359 ist_leitnuklid boolean DEFAULT false,
554 eudf_nuklid_id bigint, 360 eudf_nuklid_id bigint,
555 kennung_bvl character varying(7) 361 kennung_bvl character varying(7)
556 ); 362 );
557 363
558
559 --
560 -- Name: messgroesse_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: -
561 --
562
563 CREATE SEQUENCE messgroesse_id_seq
564 START WITH 1
565 INCREMENT BY 1
566 NO MINVALUE
567 NO MAXVALUE
568 CACHE 1;
569
570
571 --
572 -- Name: messgroesse_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
573 --
574
575 ALTER SEQUENCE messgroesse_id_seq OWNED BY messgroesse.id; 364 ALTER SEQUENCE messgroesse_id_seq OWNED BY messgroesse.id;
576 365
577 366
578 -- 367 CREATE SEQUENCE messgroessen_gruppe_id_seq
579 -- Name: messgroessen_gruppe; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: 368 START WITH 1
580 -- 369 INCREMENT BY 1
370 NO MINVALUE
371 NO MAXVALUE
372 CACHE 1;
581 373
582 CREATE TABLE messgroessen_gruppe ( 374 CREATE TABLE messgroessen_gruppe (
583 id integer NOT NULL, 375 id integer PRIMARY KEY
376 DEFAULT nextval('messgroessen_gruppe_id_seq'::regclass),
584 bezeichnung character varying(80), 377 bezeichnung character varying(80),
585 ist_leitnuklidgruppe character(1) DEFAULT NULL::bpchar 378 ist_leitnuklidgruppe character(1) DEFAULT NULL::bpchar
586 ); 379 );
587 380
588
589 --
590 -- Name: messgroessen_gruppe_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: -
591 --
592
593 CREATE SEQUENCE messgroessen_gruppe_id_seq
594 START WITH 1
595 INCREMENT BY 1
596 NO MINVALUE
597 NO MAXVALUE
598 CACHE 1;
599
600
601 --
602 -- Name: messgroessen_gruppe_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
603 --
604
605 ALTER SEQUENCE messgroessen_gruppe_id_seq OWNED BY messgroessen_gruppe.id; 381 ALTER SEQUENCE messgroessen_gruppe_id_seq OWNED BY messgroessen_gruppe.id;
606 382
607 383
608 -- 384 CREATE SEQUENCE messprogramm_kategorie_id_seq
609 -- Name: messprogramm_kategorie; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: 385 START WITH 1
610 -- 386 INCREMENT BY 1
387 NO MINVALUE
388 NO MAXVALUE
389 CACHE 1;
611 390
612 CREATE TABLE messprogramm_kategorie ( 391 CREATE TABLE messprogramm_kategorie (
613 id integer NOT NULL, 392 id integer PRIMARY KEY
393 DEFAULT nextval('messprogramm_kategorie_id_seq'::regclass),
614 netzbetreiber_id character varying(2), 394 netzbetreiber_id character varying(2),
615 mpl_id character varying(3), 395 mpl_id character varying(3),
616 bezeichnung character varying(120), 396 bezeichnung character varying(120),
617 letzte_aenderung timestamp without time zone 397 letzte_aenderung timestamp without time zone
618 ); 398 );
619 399
620 400 ALTER SEQUENCE messprogramm_kategorie_id_seq
621 -- 401 OWNED BY messprogramm_kategorie.id;
622 -- Name: messprogramm_kategorie_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: - 402
623 --
624
625 CREATE SEQUENCE messprogramm_kategorie_id_seq
626 START WITH 1
627 INCREMENT BY 1
628 NO MINVALUE
629 NO MAXVALUE
630 CACHE 1;
631
632
633 --
634 -- Name: messprogramm_kategorie_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
635 --
636
637 ALTER SEQUENCE messprogramm_kategorie_id_seq OWNED BY messprogramm_kategorie.id;
638
639
640 --
641 -- Name: mg_grp; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace:
642 --
643 403
644 CREATE TABLE mg_grp ( 404 CREATE TABLE mg_grp (
645 messgroessengruppe_id integer NOT NULL, 405 messgroessengruppe_id integer NOT NULL,
646 messgroesse_id integer NOT NULL 406 messgroesse_id integer NOT NULL
647 ); 407 );
648 408
649 409
650 --
651 -- Name: mmt_messgroesse_grp; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace:
652 --
653
654 CREATE TABLE mmt_messgroesse_grp ( 410 CREATE TABLE mmt_messgroesse_grp (
655 messgroessengruppe_id integer NOT NULL, 411 messgroessengruppe_id integer NOT NULL,
656 mmt_id character varying(2) NOT NULL 412 mmt_id character varying(2) NOT NULL
657 ); 413 );
658 414
659
660 --
661 -- Name: mmt_messgroesse; Type: VIEW; Schema: stammdaten; Owner: -
662 --
663 415
664 CREATE VIEW mmt_messgroesse AS 416 CREATE VIEW mmt_messgroesse AS
665 SELECT mmt_messgroesse_grp.mmt_id, 417 SELECT mmt_messgroesse_grp.mmt_id,
666 mg_grp.messgroesse_id 418 mg_grp.messgroesse_id
667 FROM mmt_messgroesse_grp, 419 FROM mmt_messgroesse_grp,
668 mg_grp 420 mg_grp
669 WHERE (mg_grp.messgroessengruppe_id = mmt_messgroesse_grp.messgroessengruppe_id); 421 WHERE (mg_grp.messgroessengruppe_id = mmt_messgroesse_grp.messgroessengruppe_id);
670 422
671 423
672 --
673 -- Name: netz_betreiber; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace:
674 --
675
676 CREATE TABLE netz_betreiber ( 424 CREATE TABLE netz_betreiber (
677 id character varying(2) NOT NULL, 425 id character varying(2) PRIMARY KEY,
678 netzbetreiber character varying(50), 426 netzbetreiber character varying(50),
679 idf_netzbetreiber character varying(1), 427 idf_netzbetreiber character varying(1),
680 is_bmn boolean DEFAULT false, 428 is_bmn boolean DEFAULT false,
681 mailverteiler character varying(512), 429 mailverteiler character varying(512),
682 aktiv boolean DEFAULT false, 430 aktiv boolean DEFAULT false,
683 zust_mst_id character varying(5) 431 zust_mst_id character varying(5)
684 ); 432 );
685 433
686 434
687 -- 435 CREATE SEQUENCE ort_id_seq
688 -- Name: ort; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: 436 START WITH 1
689 -- 437 INCREMENT BY 1
438 NO MINVALUE
439 NO MAXVALUE
440 CACHE 1;
690 441
691 CREATE TABLE ort ( 442 CREATE TABLE ort (
692 id integer NOT NULL, 443 id integer PRIMARY KEY DEFAULT nextval('ort_id_seq'::regclass),
693 netzbetreiber_id character varying(2), 444 netzbetreiber_id character varying(2),
694 ort_id character varying(10), 445 ort_id character varying(10),
695 langtext character varying(100), 446 langtext character varying(100),
696 staat_id smallint, 447 staat_id smallint,
697 gem_id character varying(8), 448 gem_id character varying(8),
716 aktiv character(1), 467 aktiv character(1),
717 anlage_id integer, 468 anlage_id integer,
718 oz_id integer 469 oz_id integer
719 ); 470 );
720 471
721
722 --
723 -- Name: ort_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: -
724 --
725
726 CREATE SEQUENCE ort_id_seq
727 START WITH 1
728 INCREMENT BY 1
729 NO MINVALUE
730 NO MAXVALUE
731 CACHE 1;
732
733
734 --
735 -- Name: ort_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
736 --
737
738 ALTER SEQUENCE ort_id_seq OWNED BY ort.id; 472 ALTER SEQUENCE ort_id_seq OWNED BY ort.id;
739 473
740 474
741 --
742 -- Name: ort_typ; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace:
743 --
744
745 CREATE TABLE ort_typ ( 475 CREATE TABLE ort_typ (
746 id smallint NOT NULL, 476 id smallint PRIMARY KEY,
747 ort_typ character varying(60) 477 ort_typ character varying(60)
748 ); 478 );
749 479
750 480
751 --
752 -- Name: ortszuordnung_typ; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace:
753 --
754
755 CREATE TABLE ortszuordnung_typ ( 481 CREATE TABLE ortszuordnung_typ (
756 id character(1) NOT NULL, 482 id character(1) PRIMARY KEY,
757 ortstyp character varying(60) 483 ortstyp character varying(60)
758 ); 484 );
759 485
760 486
761 -- 487 CREATE SEQUENCE pflicht_messgroesse_id_seq
762 -- Name: pflicht_messgroesse; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: 488 START WITH 1
763 -- 489 INCREMENT BY 1
490 NO MINVALUE
491 NO MAXVALUE
492 CACHE 1;
764 493
765 CREATE TABLE pflicht_messgroesse ( 494 CREATE TABLE pflicht_messgroesse (
766 id integer NOT NULL, 495 id integer PRIMARY KEY
496 DEFAULT nextval('pflicht_messgroesse_id_seq'::regclass),
767 messgroesse_id integer, 497 messgroesse_id integer,
768 mmt_id character varying(2), 498 mmt_id character varying(2),
769 umw_id character varying(3), 499 umw_id character varying(3),
770 datenbasis_id smallint NOT NULL 500 datenbasis_id smallint NOT NULL
771 ); 501 );
772 502
773
774 --
775 -- Name: pflicht_messgroesse_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: -
776 --
777
778 CREATE SEQUENCE pflicht_messgroesse_id_seq
779 START WITH 1
780 INCREMENT BY 1
781 NO MINVALUE
782 NO MAXVALUE
783 CACHE 1;
784
785
786 --
787 -- Name: pflicht_messgroesse_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
788 --
789
790 ALTER SEQUENCE pflicht_messgroesse_id_seq OWNED BY pflicht_messgroesse.id; 503 ALTER SEQUENCE pflicht_messgroesse_id_seq OWNED BY pflicht_messgroesse.id;
791 504
792 505
793 --
794 -- Name: proben_zusatz; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace:
795 --
796
797 CREATE TABLE proben_zusatz ( 506 CREATE TABLE proben_zusatz (
798 id character varying(3) NOT NULL, 507 id character varying(3) PRIMARY KEY,
799 meh_id integer, 508 meh_id integer,
800 beschreibung character varying(50) NOT NULL, 509 beschreibung character varying(50) NOT NULL,
801 zusatzwert character varying(7) NOT NULL, 510 zusatzwert character varying(7) NOT NULL,
802 eudf_keyword character varying(40) 511 eudf_keyword character varying(40)
803 ); 512 );
804 513
805 514
806 -- 515 CREATE SEQUENCE probenart_id_seq
807 -- Name: probenart; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: 516 START WITH 1
808 -- 517 INCREMENT BY 1
518 NO MINVALUE
519 NO MAXVALUE
520 CACHE 1;
809 521
810 CREATE TABLE probenart ( 522 CREATE TABLE probenart (
811 id integer NOT NULL, 523 id integer PRIMARY KEY DEFAULT nextval('probenart_id_seq'::regclass),
812 beschreibung character varying(30), 524 beschreibung character varying(30),
813 probenart character varying(5) NOT NULL, 525 probenart character varying(5) NOT NULL,
814 probenart_eudf_id character varying(1) NOT NULL 526 probenart_eudf_id character varying(1) NOT NULL
815 ); 527 );
816 528
817
818 --
819 -- Name: probenart_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: -
820 --
821
822 CREATE SEQUENCE probenart_id_seq
823 START WITH 1
824 INCREMENT BY 1
825 NO MINVALUE
826 NO MAXVALUE
827 CACHE 1;
828
829
830 --
831 -- Name: probenart_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
832 --
833
834 ALTER SEQUENCE probenart_id_seq OWNED BY probenart.id; 529 ALTER SEQUENCE probenart_id_seq OWNED BY probenart.id;
835 530
836 531
837 -- 532 CREATE SEQUENCE probenehmer_id_seq
838 -- Name: probenehmer; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: 533 START WITH 1
839 -- 534 INCREMENT BY 1
535 NO MINVALUE
536 NO MAXVALUE
537 CACHE 1;
840 538
841 CREATE TABLE probenehmer ( 539 CREATE TABLE probenehmer (
842 id integer NOT NULL, 540 id integer PRIMARY KEY DEFAULT nextval('probenehmer_id_seq'::regclass),
843 netzbetreiber_id character varying(2), 541 netzbetreiber_id character varying(2),
844 prn_id character varying(9), 542 prn_id character varying(9),
845 bearbeiter character varying(25), 543 bearbeiter character varying(25),
846 bemerkung character varying(60), 544 bemerkung character varying(60),
847 betrieb character varying(80), 545 betrieb character varying(80),
854 tp character varying(3), 552 tp character varying(3),
855 typ character(1), 553 typ character(1),
856 letzte_aenderung timestamp without time zone 554 letzte_aenderung timestamp without time zone
857 ); 555 );
858 556
859
860 --
861 -- Name: probenehmer_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: -
862 --
863
864 CREATE SEQUENCE probenehmer_id_seq
865 START WITH 1
866 INCREMENT BY 1
867 NO MINVALUE
868 NO MAXVALUE
869 CACHE 1;
870
871
872 --
873 -- Name: probenehmer_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
874 --
875
876 ALTER SEQUENCE probenehmer_id_seq OWNED BY probenehmer.id; 557 ALTER SEQUENCE probenehmer_id_seq OWNED BY probenehmer.id;
877 558
878 559
879 -- 560 CREATE SEQUENCE query_id_seq
880 -- Name: query; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: 561 START WITH 1
881 -- 562 INCREMENT BY 1
563 NO MINVALUE
564 NO MAXVALUE
565 CACHE 1;
882 566
883 CREATE TABLE query ( 567 CREATE TABLE query (
884 id integer NOT NULL, 568 id integer PRIMARY KEY DEFAULT nextval('query_id_seq'::regclass),
885 name character varying(80) NOT NULL, 569 name character varying(80) NOT NULL,
886 type character varying(30) NOT NULL, 570 type character varying(30) NOT NULL,
887 sql character varying(1500) NOT NULL, 571 sql character varying(1500) NOT NULL,
888 description character varying(100) 572 description character varying(100)
889 ); 573 );
890 574
891
892 --
893 -- Name: query_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: -
894 --
895
896 CREATE SEQUENCE query_id_seq
897 START WITH 1
898 INCREMENT BY 1
899 NO MINVALUE
900 NO MAXVALUE
901 CACHE 1;
902
903
904 --
905 -- Name: query_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
906 --
907
908 ALTER SEQUENCE query_id_seq OWNED BY query.id; 575 ALTER SEQUENCE query_id_seq OWNED BY query.id;
909 576
910 577
911 -- 578 CREATE SEQUENCE result_id_seq
912 -- Name: result; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: 579 START WITH 1
913 -- 580 INCREMENT BY 1
581 NO MINVALUE
582 NO MAXVALUE
583 CACHE 1;
914 584
915 CREATE TABLE result ( 585 CREATE TABLE result (
916 id integer NOT NULL, 586 id integer PRIMARY KEY DEFAULT nextval('result_id_seq'::regclass),
917 query_id integer NOT NULL, 587 query_id integer NOT NULL,
918 data_index character varying(50) NOT NULL, 588 data_index character varying(50) NOT NULL,
919 header character varying(50) NOT NULL, 589 header character varying(50) NOT NULL,
920 width integer, 590 width integer,
921 flex boolean, 591 flex boolean,
922 index integer 592 index integer
923 ); 593 );
924 594
925
926 --
927 -- Name: result_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: -
928 --
929
930 CREATE SEQUENCE result_id_seq
931 START WITH 1
932 INCREMENT BY 1
933 NO MINVALUE
934 NO MAXVALUE
935 CACHE 1;
936
937
938 --
939 -- Name: result_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
940 --
941
942 ALTER SEQUENCE result_id_seq OWNED BY result.id; 595 ALTER SEQUENCE result_id_seq OWNED BY result.id;
943 596
944 597
945 --
946 -- Name: s_00_view; Type: VIEW; Schema: stammdaten; Owner: -
947 --
948 598
949 CREATE VIEW s_00_view AS 599 CREATE VIEW s_00_view AS
950 SELECT deskriptoren.s_xx AS s00, 600 SELECT deskriptoren.s_xx AS s00,
951 deskriptoren.bedeutung, 601 deskriptoren.bedeutung,
952 deskriptoren.beschreibung, 602 deskriptoren.beschreibung,
953 deskriptoren.sn 603 deskriptoren.sn
954 FROM deskriptoren 604 FROM deskriptoren
955 WHERE (deskriptoren.ebene = 0); 605 WHERE (deskriptoren.ebene = 0);
956 606
957 607
958 --
959 -- Name: s_01_view; Type: VIEW; Schema: stammdaten; Owner: -
960 --
961 608
962 CREATE VIEW s_01_view AS 609 CREATE VIEW s_01_view AS
963 SELECT d1.s_xx AS s01, 610 SELECT d1.s_xx AS s01,
964 d2.s_xx AS s00, 611 d2.s_xx AS s00,
965 d1.bedeutung, 612 d1.bedeutung,
968 FROM (deskriptoren d1 615 FROM (deskriptoren d1
969 JOIN deskriptoren d2 ON ((d1.vorgaenger = d2.id))) 616 JOIN deskriptoren d2 ON ((d1.vorgaenger = d2.id)))
970 WHERE (d1.ebene = 1); 617 WHERE (d1.ebene = 1);
971 618
972 619
973 --
974 -- Name: s_02_s_01_view; Type: VIEW; Schema: stammdaten; Owner: -
975 --
976 620
977 CREATE VIEW s_02_s_01_view AS 621 CREATE VIEW s_02_s_01_view AS
978 SELECT d1.s_xx AS s01, 622 SELECT d1.s_xx AS s01,
979 d2.s_xx AS s02 623 d2.s_xx AS s02
980 FROM (deskriptoren d1 624 FROM (deskriptoren d1
981 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) 625 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
982 WHERE (d2.ebene = 2); 626 WHERE (d2.ebene = 2);
983 627
984 628
985 --
986 -- Name: s_02_view; Type: VIEW; Schema: stammdaten; Owner: -
987 --
988 629
989 CREATE VIEW s_02_view AS 630 CREATE VIEW s_02_view AS
990 SELECT DISTINCT deskriptoren.s_xx AS s00, 631 SELECT DISTINCT deskriptoren.s_xx AS s00,
991 deskriptoren.bedeutung, 632 deskriptoren.bedeutung,
992 deskriptoren.beschreibung, 633 deskriptoren.beschreibung,
993 deskriptoren.sn 634 deskriptoren.sn
994 FROM deskriptoren 635 FROM deskriptoren
995 WHERE (deskriptoren.ebene = 2); 636 WHERE (deskriptoren.ebene = 2);
996 637
997 638
998 --
999 -- Name: s_03_s_01_view; Type: VIEW; Schema: stammdaten; Owner: -
1000 --
1001 639
1002 CREATE VIEW s_03_s_01_view AS 640 CREATE VIEW s_03_s_01_view AS
1003 SELECT d1.s_xx AS s01, 641 SELECT d1.s_xx AS s01,
1004 d2.s_xx AS s03 642 d2.s_xx AS s03
1005 FROM (deskriptoren d1 643 FROM (deskriptoren d1
1006 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) 644 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
1007 WHERE ((d2.ebene = 3) AND (d1.ebene = 1)); 645 WHERE ((d2.ebene = 3) AND (d1.ebene = 1));
1008 646
1009 647
1010 --
1011 -- Name: s_03_view; Type: VIEW; Schema: stammdaten; Owner: -
1012 --
1013 648
1014 CREATE VIEW s_03_view AS 649 CREATE VIEW s_03_view AS
1015 SELECT d1.s_xx AS s03, 650 SELECT d1.s_xx AS s03,
1016 d2.s_xx AS s02, 651 d2.s_xx AS s02,
1017 d1.bedeutung, 652 d1.bedeutung,
1029 FROM (deskriptoren d1 664 FROM (deskriptoren d1
1030 JOIN deskriptoren d2 ON ((d1.vorgaenger = d2.id))) 665 JOIN deskriptoren d2 ON ((d1.vorgaenger = d2.id)))
1031 WHERE ((d1.ebene = 3) AND (d2.ebene = 1)); 666 WHERE ((d1.ebene = 3) AND (d2.ebene = 1));
1032 667
1033 668
1034 --
1035 -- Name: s_04_s_01_view; Type: VIEW; Schema: stammdaten; Owner: -
1036 --
1037 669
1038 CREATE VIEW s_04_s_01_view AS 670 CREATE VIEW s_04_s_01_view AS
1039 SELECT DISTINCT d1.s_xx AS s01, 671 SELECT DISTINCT d1.s_xx AS s01,
1040 d2.s_xx AS s04 672 d2.s_xx AS s04
1041 FROM (deskriptoren d1 673 FROM (deskriptoren d1
1042 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) 674 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
1043 WHERE (d2.ebene = 4); 675 WHERE (d2.ebene = 4);
1044 676
1045 677
1046 --
1047 -- Name: s_04_view; Type: VIEW; Schema: stammdaten; Owner: -
1048 --
1049 678
1050 CREATE VIEW s_04_view AS 679 CREATE VIEW s_04_view AS
1051 SELECT DISTINCT deskriptoren.s_xx AS s04, 680 SELECT DISTINCT deskriptoren.s_xx AS s04,
1052 deskriptoren.bedeutung, 681 deskriptoren.bedeutung,
1053 deskriptoren.beschreibung, 682 deskriptoren.beschreibung,
1054 deskriptoren.sn 683 deskriptoren.sn
1055 FROM deskriptoren 684 FROM deskriptoren
1056 WHERE (deskriptoren.ebene = 4); 685 WHERE (deskriptoren.ebene = 4);
1057 686
1058 687
1059 --
1060 -- Name: s_05_s_01_view; Type: VIEW; Schema: stammdaten; Owner: -
1061 --
1062 688
1063 CREATE VIEW s_05_s_01_view AS 689 CREATE VIEW s_05_s_01_view AS
1064 SELECT d1.s_xx AS s01, 690 SELECT d1.s_xx AS s01,
1065 d2.s_xx AS s05 691 d2.s_xx AS s05
1066 FROM (deskriptoren d1 692 FROM (deskriptoren d1
1067 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) 693 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
1068 WHERE (d2.ebene = 5); 694 WHERE (d2.ebene = 5);
1069 695
1070 696
1071 --
1072 -- Name: s_05_view; Type: VIEW; Schema: stammdaten; Owner: -
1073 --
1074 697
1075 CREATE VIEW s_05_view AS 698 CREATE VIEW s_05_view AS
1076 SELECT DISTINCT deskriptoren.s_xx AS s05, 699 SELECT DISTINCT deskriptoren.s_xx AS s05,
1077 deskriptoren.bedeutung, 700 deskriptoren.bedeutung,
1078 deskriptoren.beschreibung, 701 deskriptoren.beschreibung,
1079 deskriptoren.sn 702 deskriptoren.sn
1080 FROM deskriptoren 703 FROM deskriptoren
1081 WHERE (deskriptoren.ebene = 5); 704 WHERE (deskriptoren.ebene = 5);
1082 705
1083 706
1084 --
1085 -- Name: s_06_s_01_view; Type: VIEW; Schema: stammdaten; Owner: -
1086 --
1087 707
1088 CREATE VIEW s_06_s_01_view AS 708 CREATE VIEW s_06_s_01_view AS
1089 SELECT d1.s_xx AS s01, 709 SELECT d1.s_xx AS s01,
1090 d2.s_xx AS s06 710 d2.s_xx AS s06
1091 FROM (deskriptoren d1 711 FROM (deskriptoren d1
1092 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) 712 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
1093 WHERE (d2.ebene = 6); 713 WHERE (d2.ebene = 6);
1094 714
1095 715
1096 --
1097 -- Name: s_06_view; Type: VIEW; Schema: stammdaten; Owner: -
1098 --
1099 716
1100 CREATE VIEW s_06_view AS 717 CREATE VIEW s_06_view AS
1101 SELECT DISTINCT deskriptoren.s_xx AS s06, 718 SELECT DISTINCT deskriptoren.s_xx AS s06,
1102 deskriptoren.bedeutung, 719 deskriptoren.bedeutung,
1103 deskriptoren.beschreibung, 720 deskriptoren.beschreibung,
1104 deskriptoren.sn 721 deskriptoren.sn
1105 FROM deskriptoren 722 FROM deskriptoren
1106 WHERE (deskriptoren.ebene = 6); 723 WHERE (deskriptoren.ebene = 6);
1107 724
1108 725
1109 --
1110 -- Name: s_07_s_01_view; Type: VIEW; Schema: stammdaten; Owner: -
1111 --
1112 726
1113 CREATE VIEW s_07_s_01_view AS 727 CREATE VIEW s_07_s_01_view AS
1114 SELECT d1.s_xx AS s01, 728 SELECT d1.s_xx AS s01,
1115 d2.s_xx AS s07 729 d2.s_xx AS s07
1116 FROM (deskriptoren d1 730 FROM (deskriptoren d1
1117 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) 731 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
1118 WHERE (d2.ebene = 7); 732 WHERE (d2.ebene = 7);
1119 733
1120 734
1121 --
1122 -- Name: s_07_view; Type: VIEW; Schema: stammdaten; Owner: -
1123 --
1124 735
1125 CREATE VIEW s_07_view AS 736 CREATE VIEW s_07_view AS
1126 SELECT DISTINCT deskriptoren.s_xx AS s07, 737 SELECT DISTINCT deskriptoren.s_xx AS s07,
1127 deskriptoren.bedeutung, 738 deskriptoren.bedeutung,
1128 deskriptoren.beschreibung, 739 deskriptoren.beschreibung,
1129 deskriptoren.sn 740 deskriptoren.sn
1130 FROM deskriptoren 741 FROM deskriptoren
1131 WHERE (deskriptoren.ebene = 7); 742 WHERE (deskriptoren.ebene = 7);
1132 743
1133 744
1134 --
1135 -- Name: s_08_s_01_view; Type: VIEW; Schema: stammdaten; Owner: -
1136 --
1137 745
1138 CREATE VIEW s_08_s_01_view AS 746 CREATE VIEW s_08_s_01_view AS
1139 SELECT d1.s_xx AS s01, 747 SELECT d1.s_xx AS s01,
1140 d2.s_xx AS s08 748 d2.s_xx AS s08
1141 FROM (deskriptoren d1 749 FROM (deskriptoren d1
1142 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) 750 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
1143 WHERE (d2.ebene = 8); 751 WHERE (d2.ebene = 8);
1144 752
1145 753
1146 --
1147 -- Name: s_08_view; Type: VIEW; Schema: stammdaten; Owner: -
1148 --
1149 754
1150 CREATE VIEW s_08_view AS 755 CREATE VIEW s_08_view AS
1151 SELECT DISTINCT deskriptoren.s_xx AS s08, 756 SELECT DISTINCT deskriptoren.s_xx AS s08,
1152 deskriptoren.bedeutung, 757 deskriptoren.bedeutung,
1153 deskriptoren.beschreibung, 758 deskriptoren.beschreibung,
1154 deskriptoren.sn 759 deskriptoren.sn
1155 FROM deskriptoren 760 FROM deskriptoren
1156 WHERE (deskriptoren.ebene = 8); 761 WHERE (deskriptoren.ebene = 8);
1157 762
1158 763
1159 --
1160 -- Name: s_09_s_01_view; Type: VIEW; Schema: stammdaten; Owner: -
1161 --
1162 764
1163 CREATE VIEW s_09_s_01_view AS 765 CREATE VIEW s_09_s_01_view AS
1164 SELECT d1.s_xx AS s01, 766 SELECT d1.s_xx AS s01,
1165 d2.s_xx AS s09 767 d2.s_xx AS s09
1166 FROM (deskriptoren d1 768 FROM (deskriptoren d1
1167 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) 769 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
1168 WHERE (d2.ebene = 9); 770 WHERE (d2.ebene = 9);
1169 771
1170 772
1171 --
1172 -- Name: s_09_view; Type: VIEW; Schema: stammdaten; Owner: -
1173 --
1174 773
1175 CREATE VIEW s_09_view AS 774 CREATE VIEW s_09_view AS
1176 SELECT DISTINCT deskriptoren.s_xx AS s09, 775 SELECT DISTINCT deskriptoren.s_xx AS s09,
1177 deskriptoren.bedeutung, 776 deskriptoren.bedeutung,
1178 deskriptoren.beschreibung, 777 deskriptoren.beschreibung,
1179 deskriptoren.sn 778 deskriptoren.sn
1180 FROM deskriptoren 779 FROM deskriptoren
1181 WHERE (deskriptoren.ebene = 9); 780 WHERE (deskriptoren.ebene = 9);
1182 781
1183 782
1184 --
1185 -- Name: s_10_s_01_view; Type: VIEW; Schema: stammdaten; Owner: -
1186 --
1187 783
1188 CREATE VIEW s_10_s_01_view AS 784 CREATE VIEW s_10_s_01_view AS
1189 SELECT d1.s_xx AS s01, 785 SELECT d1.s_xx AS s01,
1190 d2.s_xx AS s10 786 d2.s_xx AS s10
1191 FROM (deskriptoren d1 787 FROM (deskriptoren d1
1192 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) 788 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
1193 WHERE (d2.ebene = 10); 789 WHERE (d2.ebene = 10);
1194 790
1195 791
1196 --
1197 -- Name: s_10_view; Type: VIEW; Schema: stammdaten; Owner: -
1198 --
1199 792
1200 CREATE VIEW s_10_view AS 793 CREATE VIEW s_10_view AS
1201 SELECT DISTINCT deskriptoren.s_xx AS s10, 794 SELECT DISTINCT deskriptoren.s_xx AS s10,
1202 deskriptoren.bedeutung, 795 deskriptoren.bedeutung,
1203 deskriptoren.beschreibung, 796 deskriptoren.beschreibung,
1204 deskriptoren.sn 797 deskriptoren.sn
1205 FROM deskriptoren 798 FROM deskriptoren
1206 WHERE (deskriptoren.ebene = 10); 799 WHERE (deskriptoren.ebene = 10);
1207 800
1208 801
1209 --
1210 -- Name: s_11_s_01_view; Type: VIEW; Schema: stammdaten; Owner: -
1211 --
1212 802
1213 CREATE VIEW s_11_s_01_view AS 803 CREATE VIEW s_11_s_01_view AS
1214 SELECT d1.s_xx AS s01, 804 SELECT d1.s_xx AS s01,
1215 d2.s_xx AS s11 805 d2.s_xx AS s11
1216 FROM (deskriptoren d1 806 FROM (deskriptoren d1
1217 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) 807 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
1218 WHERE (d2.ebene = 11); 808 WHERE (d2.ebene = 11);
1219 809
1220 810
1221 --
1222 -- Name: s_11_view; Type: VIEW; Schema: stammdaten; Owner: -
1223 --
1224 811
1225 CREATE VIEW s_11_view AS 812 CREATE VIEW s_11_view AS
1226 SELECT DISTINCT deskriptoren.s_xx AS s11, 813 SELECT DISTINCT deskriptoren.s_xx AS s11,
1227 deskriptoren.bedeutung, 814 deskriptoren.bedeutung,
1228 deskriptoren.beschreibung, 815 deskriptoren.beschreibung,
1229 deskriptoren.sn 816 deskriptoren.sn
1230 FROM deskriptoren 817 FROM deskriptoren
1231 WHERE (deskriptoren.ebene = 11); 818 WHERE (deskriptoren.ebene = 11);
1232 819
1233 820
1234 --
1235 -- Name: s_12_s_01_view; Type: VIEW; Schema: stammdaten; Owner: -
1236 --
1237 821
1238 CREATE VIEW s_12_s_01_view AS 822 CREATE VIEW s_12_s_01_view AS
1239 SELECT d1.s_xx AS s01, 823 SELECT d1.s_xx AS s01,
1240 d2.s_xx AS s12 824 d2.s_xx AS s12
1241 FROM (deskriptoren d1 825 FROM (deskriptoren d1
1242 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) 826 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
1243 WHERE (d2.ebene = 12); 827 WHERE (d2.ebene = 12);
1244 828
1245 829
1246 --
1247 -- Name: s_12_view; Type: VIEW; Schema: stammdaten; Owner: -
1248 --
1249 830
1250 CREATE VIEW s_12_view AS 831 CREATE VIEW s_12_view AS
1251 SELECT DISTINCT deskriptoren.s_xx AS s12, 832 SELECT DISTINCT deskriptoren.s_xx AS s12,
1252 deskriptoren.bedeutung, 833 deskriptoren.bedeutung,
1253 deskriptoren.beschreibung, 834 deskriptoren.beschreibung,
1254 deskriptoren.sn 835 deskriptoren.sn
1255 FROM deskriptoren 836 FROM deskriptoren
1256 WHERE (deskriptoren.ebene = 12); 837 WHERE (deskriptoren.ebene = 12);
1257 838
1258 839
1259 -- 840
1260 -- Name: staat; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace: 841 CREATE SEQUENCE staat_id_seq
1261 -- 842 START WITH 1
843 INCREMENT BY 1
844 NO MINVALUE
845 NO MAXVALUE
846 CACHE 1;
1262 847
1263 CREATE TABLE staat ( 848 CREATE TABLE staat (
1264 id integer NOT NULL, 849 id integer PRIMARY KEY DEFAULT nextval('staat_id_seq'::regclass),
1265 staat character varying(50) NOT NULL, 850 staat character varying(50) NOT NULL,
1266 hkl_id smallint NOT NULL, 851 hkl_id smallint NOT NULL,
1267 staat_iso character varying(2) NOT NULL, 852 staat_iso character varying(2) NOT NULL,
1268 staat_kurz character varying(5), 853 staat_kurz character varying(5),
1269 eu character(1) DEFAULT NULL::bpchar, 854 eu character(1) DEFAULT NULL::bpchar,
1270 koord_x_extern character varying(22), 855 koord_x_extern character varying(22),
1271 koord_y_extern character varying(22), 856 koord_y_extern character varying(22),
1272 kda_id integer 857 kda_id integer
1273 ); 858 );
1274 859
1275
1276 --
1277 -- Name: staat_id_seq; Type: SEQUENCE; Schema: stammdaten; Owner: -
1278 --
1279
1280 CREATE SEQUENCE staat_id_seq
1281 START WITH 1
1282 INCREMENT BY 1
1283 NO MINVALUE
1284 NO MAXVALUE
1285 CACHE 1;
1286
1287
1288 --
1289 -- Name: staat_id_seq; Type: SEQUENCE OWNED BY; Schema: stammdaten; Owner: -
1290 --
1291
1292 ALTER SEQUENCE staat_id_seq OWNED BY staat.id; 860 ALTER SEQUENCE staat_id_seq OWNED BY staat.id;
1293 861
1294 862
1295 --
1296 -- Name: status_kombi; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace:
1297 --
1298
1299 CREATE TABLE status_kombi ( 863 CREATE TABLE status_kombi (
1300 id integer NOT NULL, 864 id integer PRIMARY KEY,
1301 stufe_id integer, 865 stufe_id integer,
1302 wert_id integer 866 wert_id integer
1303 ); 867 );
1304 868
1305
1306 --
1307 -- Name: status_reihenfolge; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace:
1308 --
1309
1310 CREATE TABLE status_reihenfolge ( 869 CREATE TABLE status_reihenfolge (
1311 id integer NOT NULL, 870 id integer PRIMARY KEY,
1312 von_id integer, 871 von_id integer,
1313 zu_id integer 872 zu_id integer
1314 ); 873 );
1315 874
1316
1317 --
1318 -- Name: status_stufe; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace:
1319 --
1320
1321 CREATE TABLE status_stufe ( 875 CREATE TABLE status_stufe (
1322 id integer NOT NULL, 876 id integer PRIMARY KEY,
1323 stufe character varying(50) 877 stufe character varying(50)
1324 ); 878 );
1325 879
1326
1327 --
1328 -- Name: status_wert; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace:
1329 --
1330
1331 CREATE TABLE status_wert ( 880 CREATE TABLE status_wert (
1332 id integer NOT NULL, 881 id integer PRIMARY KEY,
1333 wert character varying(50) 882 wert character varying(50)
1334 ); 883 );
1335 884
1336 885
1337 --
1338 -- Name: umwelt; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace:
1339 --
1340
1341 CREATE TABLE umwelt ( 886 CREATE TABLE umwelt (
1342 id character varying(3) NOT NULL, 887 id character varying(3) PRIMARY KEY,
1343 beschreibung character varying(300), 888 beschreibung character varying(300),
1344 umwelt_bereich character varying(80) NOT NULL, 889 umwelt_bereich character varying(80) NOT NULL,
1345 meh_id integer 890 meh_id integer
1346 ); 891 );
1347 892
1348 893
1349 --
1350 -- Name: verwaltungseinheit; Type: TABLE; Schema: stammdaten; Owner: -; Tablespace:
1351 --
1352
1353 CREATE TABLE verwaltungseinheit ( 894 CREATE TABLE verwaltungseinheit (
1354 id character varying(8) NOT NULL, 895 id character varying(8) PRIMARY KEY,
1355 bundesland character varying(8) NOT NULL, 896 bundesland character varying(8) NOT NULL,
1356 kda_id integer, 897 kda_id integer,
1357 kreis character varying(8), 898 kreis character varying(8),
1358 nuts character varying(10), 899 nuts character varying(10),
1359 regbezirk character varying(8), 900 regbezirk character varying(8),
1367 plz character varying(6), 908 plz character varying(6),
1368 longitude double precision, 909 longitude double precision,
1369 latitude double precision 910 latitude double precision
1370 ); 911 );
1371 912
1372 -- 913
1373 -- Name status_erreichbar; Type: VIEW; Schema: stammdaten; Owner: -;
1374 --
1375 CREATE VIEW status_erreichbar AS ( 914 CREATE VIEW status_erreichbar AS (
1376 SELECT DISTINCT k.wert_id, 915 SELECT DISTINCT k.wert_id,
1377 j.wert_id AS cur_wert, 916 j.wert_id AS cur_wert,
1378 j.stufe_id AS cur_stufe 917 j.stufe_id AS cur_stufe
1379 FROM stammdaten.status_kombi k 918 FROM stammdaten.status_kombi k
1385 ON kom.id = r.von_id) j 924 ON kom.id = r.von_id) j
1386 ON j.zu_id = k.id 925 ON j.zu_id = k.id
1387 ); 926 );
1388 927
1389 928
1390 --
1391 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: -
1392 --
1393
1394 ALTER TABLE ONLY auth ALTER COLUMN id SET DEFAULT nextval('auth_id_seq'::regclass);
1395
1396
1397 --
1398 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: -
1399 --
1400
1401 ALTER TABLE ONLY datenbasis ALTER COLUMN id SET DEFAULT nextval('datenbasis_id_seq'::regclass);
1402
1403
1404 --
1405 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: -
1406 --
1407
1408 ALTER TABLE ONLY datensatz_erzeuger ALTER COLUMN id SET DEFAULT nextval('datensatz_erzeuger_id_seq'::regclass);
1409
1410
1411 --
1412 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: -
1413 --
1414
1415 ALTER TABLE ONLY de_vg ALTER COLUMN id SET DEFAULT nextval('de_vg_id_seq'::regclass);
1416
1417
1418 --
1419 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: -
1420 --
1421
1422 ALTER TABLE ONLY deskriptoren ALTER COLUMN id SET DEFAULT nextval('deskriptoren_id_seq'::regclass);
1423
1424
1425 --
1426 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: -
1427 --
1428
1429 ALTER TABLE ONLY favorite ALTER COLUMN id SET DEFAULT nextval('favorite_id_seq'::regclass);
1430
1431
1432 --
1433 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: -
1434 --
1435
1436 ALTER TABLE ONLY filter ALTER COLUMN id SET DEFAULT nextval('filter_id_seq'::regclass);
1437
1438
1439 --
1440 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: -
1441 --
1442
1443 ALTER TABLE ONLY filter_value ALTER COLUMN id SET DEFAULT nextval('filter_value_id_seq'::regclass);
1444
1445
1446 --
1447 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: -
1448 --
1449
1450 ALTER TABLE ONLY koordinaten_art ALTER COLUMN id SET DEFAULT nextval('koordinaten_art_id_seq'::regclass);
1451
1452
1453 --
1454 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: -
1455 --
1456
1457 ALTER TABLE ONLY lada_user ALTER COLUMN id SET DEFAULT nextval('lada_user_id_seq'::regclass);
1458
1459
1460 --
1461 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: -
1462 --
1463
1464 ALTER TABLE ONLY mess_einheit ALTER COLUMN id SET DEFAULT nextval('mess_einheit_id_seq'::regclass);
1465
1466
1467 --
1468 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: -
1469 --
1470
1471 ALTER TABLE ONLY messgroesse ALTER COLUMN id SET DEFAULT nextval('messgroesse_id_seq'::regclass);
1472
1473
1474 --
1475 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: -
1476 --
1477
1478 ALTER TABLE ONLY messgroessen_gruppe ALTER COLUMN id SET DEFAULT nextval('messgroessen_gruppe_id_seq'::regclass);
1479
1480
1481 --
1482 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: -
1483 --
1484
1485 ALTER TABLE ONLY messprogramm_kategorie ALTER COLUMN id SET DEFAULT nextval('messprogramm_kategorie_id_seq'::regclass);
1486
1487
1488 --
1489 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: -
1490 --
1491
1492 ALTER TABLE ONLY ort ALTER COLUMN id SET DEFAULT nextval('ort_id_seq'::regclass);
1493
1494
1495 --
1496 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: -
1497 --
1498
1499 ALTER TABLE ONLY pflicht_messgroesse ALTER COLUMN id SET DEFAULT nextval('pflicht_messgroesse_id_seq'::regclass);
1500
1501
1502 --
1503 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: -
1504 --
1505
1506 ALTER TABLE ONLY probenart ALTER COLUMN id SET DEFAULT nextval('probenart_id_seq'::regclass);
1507
1508
1509 --
1510 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: -
1511 --
1512
1513 ALTER TABLE ONLY probenehmer ALTER COLUMN id SET DEFAULT nextval('probenehmer_id_seq'::regclass);
1514
1515
1516 --
1517 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: -
1518 --
1519
1520 ALTER TABLE ONLY query ALTER COLUMN id SET DEFAULT nextval('query_id_seq'::regclass);
1521
1522
1523 --
1524 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: -
1525 --
1526
1527 ALTER TABLE ONLY result ALTER COLUMN id SET DEFAULT nextval('result_id_seq'::regclass);
1528
1529
1530 --
1531 -- Name: id; Type: DEFAULT; Schema: stammdaten; Owner: -
1532 --
1533
1534 ALTER TABLE ONLY staat ALTER COLUMN id SET DEFAULT nextval('staat_id_seq'::regclass);
1535
1536
1537 --
1538 -- Name: auth_lst_umw_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1539 --
1540
1541 ALTER TABLE ONLY auth_lst_umw
1542 ADD CONSTRAINT auth_lst_umw_pkey PRIMARY KEY (id);
1543
1544
1545 --
1546 -- Name: auth_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1547 --
1548
1549 ALTER TABLE ONLY auth
1550 ADD CONSTRAINT auth_pkey PRIMARY KEY (id);
1551
1552
1553 --
1554 -- Name: auth_role_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1555 --
1556
1557 ALTER TABLE ONLY auth_funktion
1558 ADD CONSTRAINT auth_role_pkey PRIMARY KEY (id);
1559
1560
1561 --
1562 -- Name: datenbasis_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1563 --
1564
1565 ALTER TABLE ONLY datenbasis
1566 ADD CONSTRAINT datenbasis_pkey PRIMARY KEY (id);
1567
1568
1569 --
1570 -- Name: datensatz_erzeuger_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1571 --
1572
1573 ALTER TABLE ONLY datensatz_erzeuger
1574 ADD CONSTRAINT datensatz_erzeuger_pkey PRIMARY KEY (id);
1575
1576
1577 --
1578 -- Name: de_vg_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1579 --
1580
1581 ALTER TABLE ONLY de_vg
1582 ADD CONSTRAINT de_vg_pkey PRIMARY KEY (id);
1583
1584
1585 --
1586 -- Name: deskriptor_umwelt_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1587 --
1588
1589 ALTER TABLE ONLY deskriptor_umwelt
1590 ADD CONSTRAINT deskriptor_umwelt_pkey PRIMARY KEY (id);
1591
1592
1593 --
1594 -- Name: favorite_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1595 --
1596
1597 ALTER TABLE ONLY favorite
1598 ADD CONSTRAINT favorite_pkey PRIMARY KEY (id);
1599
1600
1601 --
1602 -- Name: filter_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1603 --
1604
1605 ALTER TABLE ONLY filter
1606 ADD CONSTRAINT filter_pkey PRIMARY KEY (id);
1607
1608
1609 --
1610 -- Name: filter_value_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1611 --
1612
1613 ALTER TABLE ONLY filter_value
1614 ADD CONSTRAINT filter_value_pkey PRIMARY KEY (id);
1615
1616
1617 --
1618 -- Name: koordinaten_art_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1619 --
1620
1621 ALTER TABLE ONLY koordinaten_art
1622 ADD CONSTRAINT koordinaten_art_pkey PRIMARY KEY (id);
1623
1624
1625 --
1626 -- Name: lada_user_name_key; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1627 --
1628 929
1629 ALTER TABLE ONLY lada_user 930 ALTER TABLE ONLY lada_user
1630 ADD CONSTRAINT lada_user_name_key UNIQUE (name); 931 ADD CONSTRAINT lada_user_name_key UNIQUE (name);
1631 932
1632 933
1633 --
1634 -- Name: lada_user_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1635 --
1636
1637 ALTER TABLE ONLY lada_user
1638 ADD CONSTRAINT lada_user_pkey PRIMARY KEY (id);
1639
1640
1641 --
1642 -- Name: mess_einheit_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1643 --
1644
1645 ALTER TABLE ONLY mess_einheit
1646 ADD CONSTRAINT mess_einheit_pkey PRIMARY KEY (id);
1647
1648
1649 --
1650 -- Name: mess_methode_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1651 --
1652
1653 ALTER TABLE ONLY mess_methode
1654 ADD CONSTRAINT mess_methode_pkey PRIMARY KEY (id);
1655
1656
1657 --
1658 -- Name: mess_stelle_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1659 --
1660
1661 ALTER TABLE ONLY mess_stelle
1662 ADD CONSTRAINT mess_stelle_pkey PRIMARY KEY (id);
1663
1664
1665 --
1666 -- Name: messgroesse_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1667 --
1668
1669 ALTER TABLE ONLY messgroesse
1670 ADD CONSTRAINT messgroesse_pkey PRIMARY KEY (id);
1671
1672
1673 --
1674 -- Name: messgroessen_gruppe_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1675 --
1676
1677 ALTER TABLE ONLY messgroessen_gruppe
1678 ADD CONSTRAINT messgroessen_gruppe_pkey PRIMARY KEY (id);
1679
1680
1681 --
1682 -- Name: messprogramm_kategorie_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1683 --
1684
1685 ALTER TABLE ONLY messprogramm_kategorie
1686 ADD CONSTRAINT messprogramm_kategorie_pkey PRIMARY KEY (id);
1687
1688
1689 --
1690 -- Name: mg_grp_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1691 --
1692
1693 ALTER TABLE ONLY mg_grp 934 ALTER TABLE ONLY mg_grp
1694 ADD CONSTRAINT mg_grp_pkey PRIMARY KEY (messgroessengruppe_id, messgroesse_id); 935 ADD CONSTRAINT mg_grp_pkey PRIMARY KEY (messgroessengruppe_id, messgroesse_id);
1695 936
1696 937
1697 --
1698 -- Name: mmt_messgroesse_grp_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1699 --
1700
1701 ALTER TABLE ONLY mmt_messgroesse_grp 938 ALTER TABLE ONLY mmt_messgroesse_grp
1702 ADD CONSTRAINT mmt_messgroesse_grp_pkey PRIMARY KEY (messgroessengruppe_id, mmt_id); 939 ADD CONSTRAINT mmt_messgroesse_grp_pkey PRIMARY KEY (messgroessengruppe_id, mmt_id);
1703 940
1704 941
1705 --
1706 -- Name: netz_betreiber_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1707 --
1708
1709 ALTER TABLE ONLY netz_betreiber
1710 ADD CONSTRAINT netz_betreiber_pkey PRIMARY KEY (id);
1711
1712
1713 --
1714 -- Name: ort_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1715 --
1716
1717 ALTER TABLE ONLY ort
1718 ADD CONSTRAINT ort_pkey PRIMARY KEY (id);
1719
1720
1721 --
1722 -- Name: ort_typ_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1723 --
1724
1725 ALTER TABLE ONLY ort_typ
1726 ADD CONSTRAINT ort_typ_pkey PRIMARY KEY (id);
1727
1728
1729 --
1730 -- Name: ortszuordnung_typ_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1731 --
1732
1733 ALTER TABLE ONLY ortszuordnung_typ
1734 ADD CONSTRAINT ortszuordnung_typ_pkey PRIMARY KEY (id);
1735
1736
1737 --
1738 -- Name: pflicht_messgroesse_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1739 --
1740
1741 ALTER TABLE ONLY pflicht_messgroesse
1742 ADD CONSTRAINT pflicht_messgroesse_pkey PRIMARY KEY (id);
1743
1744
1745 --
1746 -- Name: pk_deskriptoren; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1747 --
1748
1749 ALTER TABLE ONLY deskriptoren
1750 ADD CONSTRAINT pk_deskriptoren PRIMARY KEY (id);
1751
1752
1753 --
1754 -- Name: proben_zusatz_eudf_keyword_key; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1755 --
1756
1757 ALTER TABLE ONLY proben_zusatz 942 ALTER TABLE ONLY proben_zusatz
1758 ADD CONSTRAINT proben_zusatz_eudf_keyword_key UNIQUE (eudf_keyword); 943 ADD CONSTRAINT proben_zusatz_eudf_keyword_key UNIQUE (eudf_keyword);
1759 944
1760 945
1761 --
1762 -- Name: proben_zusatz_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1763 --
1764
1765 ALTER TABLE ONLY proben_zusatz
1766 ADD CONSTRAINT proben_zusatz_pkey PRIMARY KEY (id);
1767
1768
1769 --
1770 -- Name: probenart_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1771 --
1772
1773 ALTER TABLE ONLY probenart
1774 ADD CONSTRAINT probenart_pkey PRIMARY KEY (id);
1775
1776
1777 --
1778 -- Name: probenehmer_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1779 --
1780
1781 ALTER TABLE ONLY probenehmer
1782 ADD CONSTRAINT probenehmer_pkey PRIMARY KEY (id);
1783
1784
1785 --
1786 -- Name: query_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1787 --
1788
1789 ALTER TABLE ONLY query
1790 ADD CONSTRAINT query_pkey PRIMARY KEY (id);
1791
1792
1793 --
1794 -- Name: result_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1795 --
1796
1797 ALTER TABLE ONLY result
1798 ADD CONSTRAINT result_pkey PRIMARY KEY (id);
1799
1800
1801 --
1802 -- Name: staat_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1803 --
1804
1805 ALTER TABLE ONLY staat
1806 ADD CONSTRAINT staat_pkey PRIMARY KEY (id);
1807
1808
1809 --
1810 -- Name: status_kombi_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1811 --
1812
1813 ALTER TABLE ONLY status_kombi
1814 ADD CONSTRAINT status_kombi_pkey PRIMARY KEY (id);
1815
1816
1817 --
1818 -- Name: status_reihenfolge_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1819 --
1820
1821 ALTER TABLE ONLY status_reihenfolge
1822 ADD CONSTRAINT status_reihenfolge_pkey PRIMARY KEY (id);
1823
1824
1825 --
1826 -- Name: status_stufe_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1827 --
1828
1829 ALTER TABLE ONLY status_stufe
1830 ADD CONSTRAINT status_stufe_pkey PRIMARY KEY (id);
1831
1832
1833 --
1834 -- Name: status_wert_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1835 --
1836
1837 ALTER TABLE ONLY status_wert
1838 ADD CONSTRAINT status_wert_pkey PRIMARY KEY (id);
1839
1840
1841 --
1842 -- Name: umwelt_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1843 --
1844
1845 ALTER TABLE ONLY umwelt
1846 ADD CONSTRAINT umwelt_pkey PRIMARY KEY (id);
1847
1848
1849 --
1850 -- Name: umwelt_umwelt_bereich_key; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1851 --
1852
1853 ALTER TABLE ONLY umwelt 946 ALTER TABLE ONLY umwelt
1854 ADD CONSTRAINT umwelt_umwelt_bereich_key UNIQUE (umwelt_bereich); 947 ADD CONSTRAINT umwelt_umwelt_bereich_key UNIQUE (umwelt_bereich);
1855 948
1856 949
1857 --
1858 -- Name: verwaltungseinheit_pkey; Type: CONSTRAINT; Schema: stammdaten; Owner: -; Tablespace:
1859 --
1860
1861 ALTER TABLE ONLY verwaltungseinheit
1862 ADD CONSTRAINT verwaltungseinheit_pkey PRIMARY KEY (id);
1863
1864
1865 --
1866 -- Name: de_vg_geom_gist; Type: INDEX; Schema: stammdaten; Owner: -; Tablespace:
1867 --
1868
1869 CREATE INDEX de_vg_geom_gist ON de_vg USING gist (geom); 950 CREATE INDEX de_vg_geom_gist ON de_vg USING gist (geom);
1870 951
1871 952
1872 --
1873 -- Name: fts_stauts_kooin10001; Type: INDEX; Schema: stammdaten; Owner: -; Tablespace:
1874 --
1875
1876 CREATE INDEX fts_stauts_kooin10001 ON staat USING btree (kda_id); 953 CREATE INDEX fts_stauts_kooin10001 ON staat USING btree (kda_id);
1877 954
1878 955
1879 --
1880 -- Name: auth_funktion_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
1881 --
1882 956
1883 ALTER TABLE ONLY auth 957 ALTER TABLE ONLY auth
1884 ADD CONSTRAINT auth_funktion_fkey FOREIGN KEY (funktion_id) REFERENCES auth_funktion(id); 958 ADD CONSTRAINT auth_funktion_fkey FOREIGN KEY (funktion_id) REFERENCES auth_funktion(id);
1885 959
1886 960
1887 --
1888 -- Name: auth_labor_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
1889 --
1890 961
1891 ALTER TABLE ONLY auth 962 ALTER TABLE ONLY auth
1892 ADD CONSTRAINT auth_labor_fkey FOREIGN KEY (labor_mst_id) REFERENCES mess_stelle(id); 963 ADD CONSTRAINT auth_labor_fkey FOREIGN KEY (labor_mst_id) REFERENCES mess_stelle(id);
1893 964
1894 965
1895 --
1896 -- Name: auth_lst_umw_lst_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
1897 --
1898 966
1899 ALTER TABLE ONLY auth_lst_umw 967 ALTER TABLE ONLY auth_lst_umw
1900 ADD CONSTRAINT auth_lst_umw_lst_fkey FOREIGN KEY (lst_id) REFERENCES mess_stelle(id); 968 ADD CONSTRAINT auth_lst_umw_lst_fkey FOREIGN KEY (lst_id) REFERENCES mess_stelle(id);
1901 969
1902 970
1903 --
1904 -- Name: auth_lst_umw_umw_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
1905 --
1906 971
1907 ALTER TABLE ONLY auth_lst_umw 972 ALTER TABLE ONLY auth_lst_umw
1908 ADD CONSTRAINT auth_lst_umw_umw_fkey FOREIGN KEY (umw_id) REFERENCES umwelt(id); 973 ADD CONSTRAINT auth_lst_umw_umw_fkey FOREIGN KEY (umw_id) REFERENCES umwelt(id);
1909 974
1910 975
1911 --
1912 -- Name: auth_mst_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
1913 --
1914 976
1915 ALTER TABLE ONLY auth 977 ALTER TABLE ONLY auth
1916 ADD CONSTRAINT auth_mst_id_fkey FOREIGN KEY (mst_id) REFERENCES mess_stelle(id); 978 ADD CONSTRAINT auth_mst_id_fkey FOREIGN KEY (mst_id) REFERENCES mess_stelle(id);
1917 979
1918 980
1919 --
1920 -- Name: auth_netzbetreiber_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
1921 --
1922 981
1923 ALTER TABLE ONLY auth 982 ALTER TABLE ONLY auth
1924 ADD CONSTRAINT auth_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES netz_betreiber(id); 983 ADD CONSTRAINT auth_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES netz_betreiber(id);
1925 984
1926 985
1927 --
1928 -- Name: datensatz_erzeuger_mst_id_fkey1; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
1929 --
1930 986
1931 ALTER TABLE ONLY datensatz_erzeuger 987 ALTER TABLE ONLY datensatz_erzeuger
1932 ADD CONSTRAINT datensatz_erzeuger_mst_id_fkey1 FOREIGN KEY (mst_id) REFERENCES mess_stelle(id); 988 ADD CONSTRAINT datensatz_erzeuger_mst_id_fkey1 FOREIGN KEY (mst_id) REFERENCES mess_stelle(id);
1933 989
1934 990
1935 --
1936 -- Name: datensatz_erzeuger_netzbetreiber_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
1937 --
1938 991
1939 ALTER TABLE ONLY datensatz_erzeuger 992 ALTER TABLE ONLY datensatz_erzeuger
1940 ADD CONSTRAINT datensatz_erzeuger_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES netz_betreiber(id); 993 ADD CONSTRAINT datensatz_erzeuger_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES netz_betreiber(id);
1941 994
1942 995
1943 --
1944 -- Name: favorite_query_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
1945 --
1946 996
1947 ALTER TABLE ONLY favorite 997 ALTER TABLE ONLY favorite
1948 ADD CONSTRAINT favorite_query_id_fkey FOREIGN KEY (query_id) REFERENCES query(id); 998 ADD CONSTRAINT favorite_query_id_fkey FOREIGN KEY (query_id) REFERENCES query(id);
1949 999
1950 1000
1951 --
1952 -- Name: favorite_user_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
1953 --
1954 1001
1955 ALTER TABLE ONLY favorite 1002 ALTER TABLE ONLY favorite
1956 ADD CONSTRAINT favorite_user_id_fkey FOREIGN KEY (user_id) REFERENCES lada_user(id); 1003 ADD CONSTRAINT favorite_user_id_fkey FOREIGN KEY (user_id) REFERENCES lada_user(id);
1957 1004
1958 1005
1959 --
1960 -- Name: filter_query_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
1961 --
1962 1006
1963 ALTER TABLE ONLY filter 1007 ALTER TABLE ONLY filter
1964 ADD CONSTRAINT filter_query_id_fkey FOREIGN KEY (query_id) REFERENCES query(id); 1008 ADD CONSTRAINT filter_query_id_fkey FOREIGN KEY (query_id) REFERENCES query(id);
1965 1009
1966 1010
1967 --
1968 -- Name: filter_value_filter_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
1969 --
1970 1011
1971 ALTER TABLE ONLY filter_value 1012 ALTER TABLE ONLY filter_value
1972 ADD CONSTRAINT filter_value_filter_id_fkey FOREIGN KEY (filter_id) REFERENCES filter(id); 1013 ADD CONSTRAINT filter_value_filter_id_fkey FOREIGN KEY (filter_id) REFERENCES filter(id);
1973 1014
1974 1015
1975 --
1976 -- Name: filter_value_query_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
1977 --
1978 1016
1979 ALTER TABLE ONLY filter_value 1017 ALTER TABLE ONLY filter_value
1980 ADD CONSTRAINT filter_value_query_id_fkey FOREIGN KEY (query_id) REFERENCES query(id); 1018 ADD CONSTRAINT filter_value_query_id_fkey FOREIGN KEY (query_id) REFERENCES query(id);
1981 1019
1982 1020
1983 --
1984 -- Name: filter_value_user_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
1985 --
1986 1021
1987 ALTER TABLE ONLY filter_value 1022 ALTER TABLE ONLY filter_value
1988 ADD CONSTRAINT filter_value_user_id_fkey FOREIGN KEY (user_id) REFERENCES lada_user(id); 1023 ADD CONSTRAINT filter_value_user_id_fkey FOREIGN KEY (user_id) REFERENCES lada_user(id);
1989 1024
1990 1025
1991 --
1992 -- Name: fk_deskriptoren_vorgaenger; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
1993 --
1994 1026
1995 ALTER TABLE ONLY deskriptoren 1027 ALTER TABLE ONLY deskriptoren
1996 ADD CONSTRAINT fk_deskriptoren_vorgaenger FOREIGN KEY (vorgaenger) REFERENCES deskriptoren(id); 1028 ADD CONSTRAINT fk_deskriptoren_vorgaenger FOREIGN KEY (vorgaenger) REFERENCES deskriptoren(id);
1997 1029
1998 1030
1999 --
2000 -- Name: messprogramm_kategorie_netzbetreiber_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
2001 --
2002 1031
2003 ALTER TABLE ONLY messprogramm_kategorie 1032 ALTER TABLE ONLY messprogramm_kategorie
2004 ADD CONSTRAINT messprogramm_kategorie_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES netz_betreiber(id); 1033 ADD CONSTRAINT messprogramm_kategorie_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES netz_betreiber(id);
2005 1034
2006 1035
2007 --
2008 -- Name: ort_anlage_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
2009 --
2010 1036
2011 ALTER TABLE ONLY ort 1037 ALTER TABLE ONLY ort
2012 ADD CONSTRAINT ort_anlage_fkey FOREIGN KEY (anlage_id) REFERENCES ort(id); 1038 ADD CONSTRAINT ort_anlage_fkey FOREIGN KEY (anlage_id) REFERENCES ort(id);
2013 1039
2014 1040
2015 --
2016 -- Name: ort_gem_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
2017 --
2018 1041
2019 ALTER TABLE ONLY ort 1042 ALTER TABLE ONLY ort
2020 ADD CONSTRAINT ort_gem_id_fkey FOREIGN KEY (gem_id) REFERENCES verwaltungseinheit(id); 1043 ADD CONSTRAINT ort_gem_id_fkey FOREIGN KEY (gem_id) REFERENCES verwaltungseinheit(id);
2021 1044
2022 1045
2023 --
2024 -- Name: ort_kda_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
2025 --
2026 1046
2027 ALTER TABLE ONLY ort 1047 ALTER TABLE ONLY ort
2028 ADD CONSTRAINT ort_kda_id_fkey FOREIGN KEY (kda_id) REFERENCES koordinaten_art(id); 1048 ADD CONSTRAINT ort_kda_id_fkey FOREIGN KEY (kda_id) REFERENCES koordinaten_art(id);
2029 1049
2030 1050
2031 --
2032 -- Name: ort_netzbetreiber_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
2033 --
2034 1051
2035 ALTER TABLE ONLY ort 1052 ALTER TABLE ONLY ort
2036 ADD CONSTRAINT ort_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES netz_betreiber(id); 1053 ADD CONSTRAINT ort_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES netz_betreiber(id);
2037 1054
2038 1055
2039 --
2040 -- Name: ort_ort_typ_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
2041 --
2042 1056
2043 ALTER TABLE ONLY ort 1057 ALTER TABLE ONLY ort
2044 ADD CONSTRAINT ort_ort_typ_fkey FOREIGN KEY (ort_typ) REFERENCES ort_typ(id); 1058 ADD CONSTRAINT ort_ort_typ_fkey FOREIGN KEY (ort_typ) REFERENCES ort_typ(id);
2045 1059
2046 1060
2047 --
2048 -- Name: ort_oz_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
2049 --
2050 1061
2051 ALTER TABLE ONLY ort 1062 ALTER TABLE ONLY ort
2052 ADD CONSTRAINT ort_oz_fkey FOREIGN KEY (oz_id) REFERENCES ort(id); 1063 ADD CONSTRAINT ort_oz_fkey FOREIGN KEY (oz_id) REFERENCES ort(id);
2053 1064
2054 1065
2055 --
2056 -- Name: ort_staat_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
2057 --
2058 1066
2059 ALTER TABLE ONLY ort 1067 ALTER TABLE ONLY ort
2060 ADD CONSTRAINT ort_staat_id_fkey FOREIGN KEY (staat_id) REFERENCES staat(id); 1068 ADD CONSTRAINT ort_staat_id_fkey FOREIGN KEY (staat_id) REFERENCES staat(id);
2061 1069
2062 1070
2063 --
2064 -- Name: pflicht_messgroesse_datenbasis_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
2065 --
2066 1071
2067 ALTER TABLE ONLY pflicht_messgroesse 1072 ALTER TABLE ONLY pflicht_messgroesse
2068 ADD CONSTRAINT pflicht_messgroesse_datenbasis_id_fkey FOREIGN KEY (datenbasis_id) REFERENCES datenbasis(id); 1073 ADD CONSTRAINT pflicht_messgroesse_datenbasis_id_fkey FOREIGN KEY (datenbasis_id) REFERENCES datenbasis(id);
2069 1074
2070 1075
2071 --
2072 -- Name: pflicht_messgroesse_mmt_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
2073 --
2074 1076
2075 ALTER TABLE ONLY pflicht_messgroesse 1077 ALTER TABLE ONLY pflicht_messgroesse
2076 ADD CONSTRAINT pflicht_messgroesse_mmt_id_fkey FOREIGN KEY (mmt_id) REFERENCES mess_methode(id); 1078 ADD CONSTRAINT pflicht_messgroesse_mmt_id_fkey FOREIGN KEY (mmt_id) REFERENCES mess_methode(id);
2077 1079
2078 1080
2079 --
2080 -- Name: pflicht_messgroesse_umw_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
2081 --
2082 1081
2083 ALTER TABLE ONLY pflicht_messgroesse 1082 ALTER TABLE ONLY pflicht_messgroesse
2084 ADD CONSTRAINT pflicht_messgroesse_umw_id_fkey FOREIGN KEY (umw_id) REFERENCES umwelt(id); 1083 ADD CONSTRAINT pflicht_messgroesse_umw_id_fkey FOREIGN KEY (umw_id) REFERENCES umwelt(id);
2085 1084
2086 1085
2087 --
2088 -- Name: proben_zusatz_meh_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
2089 --
2090 1086
2091 ALTER TABLE ONLY proben_zusatz 1087 ALTER TABLE ONLY proben_zusatz
2092 ADD CONSTRAINT proben_zusatz_meh_id_fkey FOREIGN KEY (meh_id) REFERENCES mess_einheit(id); 1088 ADD CONSTRAINT proben_zusatz_meh_id_fkey FOREIGN KEY (meh_id) REFERENCES mess_einheit(id);
2093 1089
2094 1090
2095 --
2096 -- Name: probenehmer_netzbetreiber_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
2097 --
2098 1091
2099 ALTER TABLE ONLY probenehmer 1092 ALTER TABLE ONLY probenehmer
2100 ADD CONSTRAINT probenehmer_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES netz_betreiber(id); 1093 ADD CONSTRAINT probenehmer_netzbetreiber_id_fkey FOREIGN KEY (netzbetreiber_id) REFERENCES netz_betreiber(id);
2101 1094
2102 1095
2103 --
2104 -- Name: result_query_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
2105 --
2106 1096
2107 ALTER TABLE ONLY result 1097 ALTER TABLE ONLY result
2108 ADD CONSTRAINT result_query_id_fkey FOREIGN KEY (query_id) REFERENCES query(id); 1098 ADD CONSTRAINT result_query_id_fkey FOREIGN KEY (query_id) REFERENCES query(id);
2109 1099
2110 1100
2111 --
2112 -- Name: staat_kda_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
2113 --
2114 1101
2115 ALTER TABLE ONLY staat 1102 ALTER TABLE ONLY staat
2116 ADD CONSTRAINT staat_kda_id_fkey FOREIGN KEY (kda_id) REFERENCES koordinaten_art(id); 1103 ADD CONSTRAINT staat_kda_id_fkey FOREIGN KEY (kda_id) REFERENCES koordinaten_art(id);
2117 1104
2118 1105
2119 --
2120 -- Name: status_kombi_stufe_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
2121 --
2122 1106
2123 ALTER TABLE ONLY status_kombi 1107 ALTER TABLE ONLY status_kombi
2124 ADD CONSTRAINT status_kombi_stufe_id_fkey FOREIGN KEY (stufe_id) REFERENCES status_stufe(id); 1108 ADD CONSTRAINT status_kombi_stufe_id_fkey FOREIGN KEY (stufe_id) REFERENCES status_stufe(id);
2125 1109
2126 1110
2127 --
2128 -- Name: status_kombi_wert_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
2129 --
2130 1111
2131 ALTER TABLE ONLY status_kombi 1112 ALTER TABLE ONLY status_kombi
2132 ADD CONSTRAINT status_kombi_wert_id_fkey FOREIGN KEY (wert_id) REFERENCES status_wert(id); 1113 ADD CONSTRAINT status_kombi_wert_id_fkey FOREIGN KEY (wert_id) REFERENCES status_wert(id);
2133 1114
2134 1115
2135 --
2136 -- Name: status_reihenfolge_von_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
2137 --
2138 1116
2139 ALTER TABLE ONLY status_reihenfolge 1117 ALTER TABLE ONLY status_reihenfolge
2140 ADD CONSTRAINT status_reihenfolge_von_id_fkey FOREIGN KEY (von_id) REFERENCES status_kombi(id); 1118 ADD CONSTRAINT status_reihenfolge_von_id_fkey FOREIGN KEY (von_id) REFERENCES status_kombi(id);
2141 1119
2142 1120
2143 --
2144 -- Name: status_reihenfolge_zu_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
2145 --
2146 1121
2147 ALTER TABLE ONLY status_reihenfolge 1122 ALTER TABLE ONLY status_reihenfolge
2148 ADD CONSTRAINT status_reihenfolge_zu_id_fkey FOREIGN KEY (zu_id) REFERENCES status_kombi(id); 1123 ADD CONSTRAINT status_reihenfolge_zu_id_fkey FOREIGN KEY (zu_id) REFERENCES status_kombi(id);
2149 1124
2150 1125
2151 --
2152 -- Name: umwelt_meh_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
2153 --
2154 1126
2155 ALTER TABLE ONLY umwelt 1127 ALTER TABLE ONLY umwelt
2156 ADD CONSTRAINT umwelt_meh_id_fkey FOREIGN KEY (meh_id) REFERENCES mess_einheit(id); 1128 ADD CONSTRAINT umwelt_meh_id_fkey FOREIGN KEY (meh_id) REFERENCES mess_einheit(id);
2157 1129
2158 1130
2159 --
2160 -- Name: verwaltungseinheit_kda_id_fkey; Type: FK CONSTRAINT; Schema: stammdaten; Owner: -
2161 --
2162 1131
2163 ALTER TABLE ONLY verwaltungseinheit 1132 ALTER TABLE ONLY verwaltungseinheit
2164 ADD CONSTRAINT verwaltungseinheit_kda_id_fkey FOREIGN KEY (kda_id) REFERENCES koordinaten_art(id); 1133 ADD CONSTRAINT verwaltungseinheit_kda_id_fkey FOREIGN KEY (kda_id) REFERENCES koordinaten_art(id);
2165 1134
2166 1135
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)