Mercurial > lada > lada-server
comparison db_schema/stammdaten_schema.sql @ 1188:1bc8ab13e1f7
redesign stammdaten.verwaltungseinheit
author | Michael Stanko <mstanko@bfs.de> |
---|---|
date | Fri, 25 Nov 2016 09:37:39 +0100 |
parents | 612107caf961 |
children | 289edf060550 |
comparison
equal
deleted
inserted
replaced
1187:3c24d33bf0db | 1188:1bc8ab13e1f7 |
---|---|
147 koord_x_extern character varying(22), | 147 koord_x_extern character varying(22), |
148 koord_y_extern character varying(22), | 148 koord_y_extern character varying(22), |
149 kda_id integer REFERENCES koordinaten_art | 149 kda_id integer REFERENCES koordinaten_art |
150 ); | 150 ); |
151 | 151 |
152 | |
153 CREATE TABLE verwaltungseinheit ( | 152 CREATE TABLE verwaltungseinheit ( |
154 id character varying(8) PRIMARY KEY, | 153 id character varying(8) NOT NULL PRIMARY KEY, |
154 bezeichnung character varying(80) NOT NULL, | |
155 regbezirk character varying(8), | |
156 kreis character varying(8), | |
155 bundesland character varying(8) NOT NULL, | 157 bundesland character varying(8) NOT NULL, |
156 kda_id integer REFERENCES koordinaten_art, | 158 is_gemeinde boolean DEFAULT false NOT NULL, |
157 kreis character varying(8), | 159 is_landkreis boolean DEFAULT false NOT NULL, |
160 is_regbezirk boolean DEFAULT false NOT NULL, | |
161 is_bundesland boolean DEFAULT false NOT NULL, | |
162 plz character varying(6), | |
158 nuts character varying(10), | 163 nuts character varying(10), |
159 regbezirk character varying(8), | 164 mittelpunkt public.geometry(Point) |
160 bezeichnung character varying(80) NOT NULL, | 165 ); |
161 is_bundesland character(1) NOT NULL, | 166 |
162 is_gemeinde character(1) NOT NULL, | 167 CREATE TABLE verwaltungsgrenze ( |
163 is_landkreis character(1) NOT NULL, | 168 id serial PRIMARY KEY, |
164 is_regbezirk character(1) NOT NULL, | 169 gem_id character varying(8) NOT NULL, |
165 koord_x_extern character varying(22), | 170 shape public.geometry(MultiPolygon) |
166 koord_y_extern character varying(22), | 171 ); |
167 plz character varying(6), | |
168 longitude double precision, | |
169 latitude double precision | |
170 ); | |
171 | |
172 | 172 |
173 CREATE TABLE netz_betreiber ( | 173 CREATE TABLE netz_betreiber ( |
174 id character varying(2) PRIMARY KEY, | 174 id character varying(2) PRIMARY KEY, |
175 netzbetreiber character varying(50), | 175 netzbetreiber character varying(50), |
176 idf_netzbetreiber character varying(1), | 176 idf_netzbetreiber character varying(1), |