GLE-Layer-BLPS

Aus kvwmap
Version vom 23. Oktober 2023, 10:07 Uhr von Markus Hentschel (Diskussion | Beiträge)

(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu: Navigation, Suche
-- Layerdump aus kvwmap vom 23.10.2023 11:02:44
-- Achtung: Die Datenbank in die der Dump eingespielt wird, sollte die gleiche Migrationsversion haben,
-- wie die Datenbank aus der exportiert wurde! Anderenfalls kann es zu Fehlern bei der Ausführung des SQL kommen.

SET @group_id = 1;
SET @connection = ;
SET @connection_id = '1';

-- Layer 50304526
INSERT INTO layer (`Name`, `alias`, `Datentyp`, `Gruppe`, `pfad`, `maintable`, `oid`, `Data`, `schema`, `document_path`, `tileindex`, `tileitem`, `labelangleitem`, `labelitem`, `labelmaxscale`, `labelminscale`, `labelrequires`, `connection`, `connection_id`, `printconnection`, `connectiontype`, `classitem`, `tolerance`, `toleranceunits`, `sizeunits`, `epsg_code`, `template`, `queryable`, `transparency`, `drawingorder`, `minscale`, `maxscale`, `offsite`, `ows_srs`, `wms_name`, `wms_server_version`, `wms_format`, `wms_connectiontimeout`, `wms_auth_username`, `wms_auth_password`, `wfs_geom`, `write_mapserver_templates`, `selectiontype`, `querymap`, `logconsume`, `processing`, `kurzbeschreibung`, `datasource`, `dataowner_name`, `dataowner_email`, `dataowner_tel`, `uptodateness`, `updatecycle`, `metalink`, `privileg`, `trigger_function`, `sync`) VALUES ('B-Pläne', 'B-Pläne (BLPS)', '2', @group_id, 'SELECT gml_id, \r\nplanart, nummer, name, coalesce((planaufstellendegemeinde[1]).gemeindename, (gemeinde[1]).gemeindename, \'\') as aufstellendegemeindename, \r\n(select amtsname from alkis.pp_amt where amt = substring((p.gemeinde[1]).rs,6,4)) as amt_aktuell,  (gemeinde[1]).gemeindename as gemeindename_aktuell, (gemeinde[1]).ags as gemeindeschluessel_aktuell, (select coalesce(ab.beschreibung,org.beschreibung) from bp_planart org left join anzeige_beschreibung ab on org.wert = ab.wert where ab.tabelle = \'bp_planart\' and ab.wert = p.planart[1]) || coalesce(\' Nr. \' || nummer, \'\') as planbezeichnung, \r\nsonstplanart, rechtsstand, inkrafttretensdatum as datum_inkraft, verfahren, externereferenz, texte, begruendungstexte, beschreibung, kommentar, plangeber, planaufstellendegemeinde, status, aufstellungsbeschlussdatum, technherstelldatum, ausfertigungsdatum, traegerbeteiligungsstartdatum, traegerbeteiligungsenddatum, auslegungsstartdatum, auslegungsenddatum, aenderungenbisdatum, genehmigungsdatum, inkrafttretensdatum, rechtsverordnungsdatum, satzungsbeschlussdatum, veraenderungssperre, veraenderungssperredatum, untergangsdatum, erschliessungsvertrag, durchfuehrungsvertrag, staedtebaulichervertrag, gruenordnungsplan, erstellungsmassstab, bezugshoehe, hoehenbezug, verfahrensmerkmale, hatgenerattribut, aendert, wurdegeaendertvon, raeumlichergeltungsbereich FROM bp_plan p WHERE (1 = 1) ORDER BY inkrafttretensdatum', 'bp_plan', 'gml_id', 'raeumlichergeltungsbereich FROM (\r\nSELECT gml_id, rechtsstand, raeumlichergeltungsbereich  FROM xplan.bp_plan order by inkrafttretensdatum\r\n) AS foo USING UNIQUE gml_id USING SRID=25833', 'xplan', , , , , , NULL, NULL, , @connection, @connection_id, , '6', , '3', 'pixels', NULL, '25833', , '1', NULL, '104500', '50', '200000', , 'EPSG:25833', , '1.0.0', 'image/png', '60', , , , '0', , '1', '0', , , , , , , , , , '0', , '0');
SET @last_layer_id50304526=LAST_INSERT_ID();

-- Attribut aendert des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'aendert', 'aendert', 'bp_plan', 'p', '_18', , , '1', '1', NULL, NULL, , 'Text', , 'ändert', , , , , , 'Historie;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '47', '0', '0');

-- Attribut aenderungenbisdatum des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'aenderungenbisdatum', 'aenderungenbisdatum', 'bp_plan', 'p', 'date', , , '1', '1', NULL, NULL, , 'Text', , 'Änderungen-Bis Datum', , , , , , 'Status;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '30', '0', '0');

-- Attribut amt_aktuell des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'amt_aktuell', , , , 'varchar', , , '0', NULL, NULL, NULL, , 'Text', , 'Amt aktuell', , , , , , 'Stammdaten', '0', '0', NULL, '0', '0', NULL, '1', , , , '6', '0', '0');

-- Attribut aufstellendegemeindename des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'aufstellendegemeindename', , , , 'text', , , '0', NULL, NULL, NULL, , 'Text', , 'Aufstellende Gemeinde', , , , , , 'Stammdaten', '0', '0', NULL, '0', '0', NULL, '1', , , , '5', '0', '0');

-- Attribut aufstellungsbeschlussdatum des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'aufstellungsbeschlussdatum', 'aufstellungsbeschlussdatum', 'bp_plan', 'p', 'date', , , '1', '1', NULL, NULL, , 'Text', , 'Datum Aufstellungsbeschluss', , , , , , 'Status;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '23', '0', '0');

-- Attribut ausfertigungsdatum des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'ausfertigungsdatum', 'ausfertigungsdatum', 'bp_plan', 'p', 'date', , , '1', '1', NULL, NULL, , 'Text', , 'Datum der Ausfertigung', , , , , , 'Status;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '25', '0', '0');

-- Attribut auslegungsenddatum des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'auslegungsenddatum', 'auslegungsenddatum', 'bp_plan', 'p', '_date', , , '1', '1', NULL, NULL, , 'Text', , 'Auslegung Enddatum', , , , , , 'Status;collapsed', '1', '0', NULL, '0', '0', NULL, '1', , , , '29', '0', '0');

-- Attribut auslegungsstartdatum des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'auslegungsstartdatum', 'auslegungsstartdatum', 'bp_plan', 'p', '_date', , , '1', '1', NULL, NULL, , 'Text', , 'Auslegung Startdatum', , , , , , 'Status;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '28', '0', '0');

-- Attribut begruendungstexte des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'begruendungstexte', 'begruendungstexte', 'bp_plan', 'p', '_14', , , '1', '1', NULL, NULL, , 'Text', , 'Begründungstexte', , , , , , 'Texte;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '16', '0', '0');

-- Attribut beschreibung des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'beschreibung', 'beschreibung', 'bp_plan', 'p', 'text', , , '1', '1', NULL, NULL, , 'Text', , 'Beschreibung', , , , , , 'Zusatzinfos;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '17', '0', '0');

-- Attribut bezugshoehe des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'bezugshoehe', 'bezugshoehe', 'bp_plan', 'p', 'numeric', , , '1', '1', NULL, NULL, , 'Text', , 'Bezugshöhe', , , , , , 'technische Merkmale;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '43', '0', '0');

-- Attribut datum_inkraft des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'datum_inkraft', 'inkrafttretensdatum', 'bp_plan', 'p', 'date', , , '1', '1', NULL, NULL, , 'Text', , 'Datum des Inkrafttretens', , , , , , 'Stammdaten', '1', '0', NULL, '0', '0', NULL, '2', 'rechtsstand', '=', '4000', '12', '0', '0');

-- Attribut durchfuehrungsvertrag des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'durchfuehrungsvertrag', 'durchfuehrungsvertrag', 'bp_plan', 'p', 'bool', , , '1', '1', NULL, NULL, , 'Checkbox', , 'Durchführungsvertrag', , , , , , 'Verträge;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '39', '0', '0');

-- Attribut erschliessungsvertrag des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'erschliessungsvertrag', 'erschliessungsvertrag', 'bp_plan', 'p', 'bool', , , '1', '1', NULL, NULL, , 'Checkbox', , 'Erschließungsvertrag', , , , , , 'Verträge;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '38', '0', '0');

-- Attribut erstellungsmassstab des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'erstellungsmassstab', 'erstellungsmassstab', 'bp_plan', 'p', 'int4', , , '1', '1', '32', '0', , 'Text', , 'Erstellungsmassstab', , , , , , 'technische Merkmale;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '42', '0', '0');

-- Attribut externereferenz des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'externereferenz', 'externereferenz', 'bp_plan', 'p', '_12', , , '1', '1', NULL, NULL, , 'Text', , 'Plandateien', , , , , , 'Dokumente', '0', '0', NULL, '0', '0', NULL, '1', , , , '14', '0', '0');

-- Attribut gemeindename_aktuell des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'gemeindename_aktuell', , , , 'text', , , '0', NULL, NULL, NULL, , 'Text', , 'Gemeindename aktuell', , , , , , 'Stammdaten', '0', '0', NULL, '0', '0', NULL, '1', , , , '7', '0', '0');

-- Attribut gemeindeschluessel_aktuell des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'gemeindeschluessel_aktuell', , , , 'text', , , '0', NULL, NULL, NULL, , 'Text', , 'Gemeindeschlüssel aktuell', , , , , , 'Stammdaten', '1', '0', NULL, '0', '0', NULL, '1', , , , '8', '0', '0');

-- Attribut genehmigungsdatum des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'genehmigungsdatum', 'genehmigungsdatum', 'bp_plan', 'p', 'date', , , '1', '1', NULL, NULL, , 'Text', , 'Genehmigungsdatum', , , , , , 'Status;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '31', '0', '0');

-- Attribut gml_id des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'gml_id', 'gml_id', 'bp_plan', 'p', 'text', , 'UNIQUE', '1', '0', NULL, NULL, , 'Text', , 'Gml ID', , , , , , 'Internes;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '1', '0', '0');

-- Attribut gruenordnungsplan des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'gruenordnungsplan', 'gruenordnungsplan', 'bp_plan', 'p', 'bool', , , '1', '1', NULL, NULL, , 'Checkbox', , 'Grünordnungsplan', , , , , , 'Verträge;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '41', '0', '0');

-- Attribut hatgenerattribut des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'hatgenerattribut', 'hatgenerattribut', 'bp_plan', 'p', '_17', , , '1', '1', NULL, NULL, , 'Text', , 'generische Attribute', , , , , , 'technische Merkmale;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '46', '0', '0');

-- Attribut hoehenbezug des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'hoehenbezug', 'hoehenbezug', 'bp_plan', 'p', 'text', , , '1', '1', NULL, NULL, , 'Text', , 'Höhenbezug', , , , , , 'technische Merkmale;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '44', '0', '0');

-- Attribut inkrafttretensdatum des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'inkrafttretensdatum', 'inkrafttretensdatum', 'bp_plan', 'p', 'date', , , '1', '1', NULL, NULL, , 'Text', , 'Datum des Inkrafttretens', , , , , , 'Status;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '32', '0', '0');

-- Attribut kommentar des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'kommentar', 'kommentar', 'bp_plan', 'p', 'text', , , '1', '1', NULL, NULL, , 'Text', , 'Kommentar', , , , , , 'Zusatzinfos;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '18', '0', '0');

-- Attribut name des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'name', 'name', 'bp_plan', 'p', 'text', , , '1', '1', NULL, NULL, , 'Text', , 'Planname', , , , , , 'Stammdaten', '0', '0', NULL, '0', '0', NULL, '1', , , , '4', '0', '0');

-- Attribut nummer des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'nummer', 'nummer', 'bp_plan', 'p', 'text', , , '1', '1', NULL, NULL, , 'Text', , 'Plannummer', , , , , , 'Stammdaten', '0', '0', NULL, '0', '0', NULL, '1', , , , '3', '0', '1');

-- Attribut planart des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'planart', 'planart', 'bp_plan', 'p', '_text', , , '1', '1', NULL, NULL, , 'Auswahlfeld', 'SELECT coalesce(ab.wert,org.wert) AS value, coalesce(ab.beschreibung,org.beschreibung) AS output\r\nFROM bp_planart org\r\nleft join anzeige_beschreibung ab on org.wert = ab.wert\r\nwhere  ab.tabelle = \'bp_planart\' \r\norder by output\r\n', 'Planart', , , , , , 'Stammdaten', '0', '0', NULL, '0', '0', NULL, '1', , , , '2', '0', '1');

-- Attribut planaufstellendegemeinde des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'planaufstellendegemeinde', 'planaufstellendegemeinde', 'bp_plan', 'p', '_11', , , '1', '1', NULL, NULL, , 'Text', , 'Aufstellende Gemeinde', , , , , , 'Zusatzinfos;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '20', '0', '0');

-- Attribut planbezeichnung des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'planbezeichnung', , , , 'text', , , '0', NULL, NULL, NULL, , 'Text', , 'Planbezeichnung', , , , , , 'Stammdaten', '0', '0', NULL, '0', '0', NULL, '1', , , , '9', '0', '0');

-- Attribut plangeber des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'plangeber', 'plangeber', 'bp_plan', 'p', '15', , , '1', '1', NULL, NULL, , 'Text', , 'Plangeber', , , , , , 'Zusatzinfos;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '19', '0', '0');

-- Attribut raeumlichergeltungsbereich des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'raeumlichergeltungsbereich', 'raeumlichergeltungsbereich', 'bp_plan', 'p', 'geometry', 'MULTIPOLYGON', , '1', '0', NULL, NULL, , 'Geometrie', , 'räumlicher Geltungsbereich', , , , , , 'Geometrie', '0', '0', NULL, '0', '0', NULL, '1', , , , '49', '0', '0');

-- Attribut rechtsstand des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'rechtsstand', 'rechtsstand', 'bp_plan', 'p', 'text', , , '1', '1', NULL, NULL, , 'Auswahlfeld', 'SELECT ab.tabelle, coalesce(ab.wert,org.wert) AS value, coalesce(ab.beschreibung,org.beschreibung) AS output\r\nFROM bp_rechtsstand org\r\nleft join anzeige_beschreibung ab on org.wert = ab.wert\r\nwhere  ab.tabelle = \'bp_rechtsstand\' \r\norder by output', 'Aktueller Rechtsstand', , , , , , 'Stammdaten', '0', '0', NULL, '0', '0', NULL, '1', , , , '11', '0', '0');

-- Attribut rechtsverordnungsdatum des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'rechtsverordnungsdatum', 'rechtsverordnungsdatum', 'bp_plan', 'p', 'date', , , '1', '1', NULL, NULL, , 'Text', , 'Datum der Rechtsverordnung', , , , , , 'Status;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '33', '0', '0');

-- Attribut satzungsbeschlussdatum des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'satzungsbeschlussdatum', 'satzungsbeschlussdatum', 'bp_plan', 'p', 'date', , , '1', '1', NULL, NULL, , 'Text', , 'Datum des Satzungsbeschlusses', , , , , , 'Status;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '34', '0', '0');

-- Attribut sonstplanart des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'sonstplanart', 'sonstplanart', 'bp_plan', 'p', 'text', , , '1', '1', NULL, NULL, , 'Auswahlfeld', 'SELECT coalesce(ab.wert,org.wert) AS value, coalesce(ab.beschreibung,org.beschreibung) AS output\r\nFROM bp_sonstplanart org\r\nleft join anzeige_beschreibung ab on org.wert = ab.wert\r\nwhere  ab.tabelle = \'bp_sonstplanart\' \r\norder by output', 'sonstige Planart', , , , , , 'Stammdaten', '0', '0', NULL, '0', '0', NULL, '1', , , , '10', '0', '0');

-- Attribut staedtebaulichervertrag des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'staedtebaulichervertrag', 'staedtebaulichervertrag', 'bp_plan', 'p', 'bool', , , '1', '1', NULL, NULL, , 'Checkbox', , 'Städtebaulicher Vertrag', , , , , , 'Verträge;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '40', '0', '0');

-- Attribut status des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'status', 'status', 'bp_plan', 'p', 'text', , , '1', '1', NULL, NULL, , 'Auswahlfeld', 'SELECT ab.tabelle, coalesce(ab.wert,org.wert) AS value, coalesce(ab.beschreibung,org.beschreibung) AS output\r\nFROM bp_status org\r\nleft join anzeige_beschreibung ab on org.wert = ab.wert\r\nwhere  ab.tabelle = \'bp_status\' \r\norder by output', 'Planstatus', , , , , , 'Status;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '22', '0', '0');

-- Attribut technherstelldatum des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'technherstelldatum', 'technherstelldatum', 'bp_plan', 'p', 'date', , , '1', '1', NULL, NULL, , 'Text', , 'Datum technische Herstellung', , , , , , 'Status;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '24', '0', '0');

-- Attribut texte des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'texte', 'texte', 'bp_plan', 'p', '_13', , , '1', '1', NULL, NULL, , 'Text', , 'Textteile', , , , , , 'Texte;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '15', '0', '0');

-- Attribut traegerbeteiligungsenddatum des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'traegerbeteiligungsenddatum', 'traegerbeteiligungsenddatum', 'bp_plan', 'p', '_date', , , '1', '1', NULL, NULL, , 'Text', , 'TÖB-Beteiligung Enddatum', , , , , , 'Status;collapsed', '1', '0', NULL, '0', '0', NULL, '1', , , , '27', '0', '0');

-- Attribut traegerbeteiligungsstartdatum des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'traegerbeteiligungsstartdatum', 'traegerbeteiligungsstartdatum', 'bp_plan', 'p', '_date', , , '1', '1', NULL, NULL, , 'Text', , 'TÖB-Beteiligung Startdatum', , , , , , 'Status;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '26', '0', '0');

-- Attribut untergangsdatum des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'untergangsdatum', 'untergangsdatum', 'bp_plan', 'p', 'date', , , '1', '1', NULL, NULL, , 'Text', , 'Untergangsdatum', , , , , , 'Status;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '37', '0', '0');

-- Attribut veraenderungssperre des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'veraenderungssperre', 'veraenderungssperre', 'bp_plan', 'p', 'bool', , , '1', '1', NULL, NULL, , 'Checkbox', , 'Veränderungssperre', , , , , , 'Status;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '35', '0', '0');

-- Attribut veraenderungssperredatum des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'veraenderungssperredatum', 'veraenderungssperredatum', 'bp_plan', 'p', 'date', , , '1', '1', NULL, NULL, , 'Text', , 'Datum der Veränderungssperre', , , , , , 'Status;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '36', '0', '0');

-- Attribut verfahren des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'verfahren', 'verfahren', 'bp_plan', 'p', 'text', , , '1', '1', NULL, NULL, , 'Auswahlfeld', 'SELECT ab.tabelle, coalesce(ab.wert,org.wert) AS value, coalesce(ab.beschreibung,org.beschreibung) AS output\r\nFROM bp_verfahren org\r\nleft join anzeige_beschreibung ab on org.wert = ab.wert\r\nwhere  ab.tabelle = \'bp_verfahren\' \r\norder by output', 'Verfahrensart', , , , , , 'Stammdaten', '0', '0', NULL, '0', '0', NULL, '1', , , , '13', '0', '0');

-- Attribut verfahrensmerkmale des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'verfahrensmerkmale', 'verfahrensmerkmale', 'bp_plan', 'p', '_16', , , '1', '1', NULL, NULL, , 'Text', , 'Verfahrensmerkmale', , , , , , 'technische Merkmale;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '45', '0', '0');

-- Attribut wurdegeaendertvon des Layers 50304526
INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50304526, 'wurdegeaendertvon', 'wurdegeaendertvon', 'bp_plan', 'p', '_18', , , '1', '1', NULL, NULL, , 'Text', , 'wurde geändert von', , , , , , 'Historie;collapsed', '0', '0', NULL, '0', '0', NULL, '1', , , , '48', '0', '0');

-- Class 52873956 des Layers 50304526
INSERT INTO classes (`Name`, `Layer_ID`, `Expression`, `drawingorder`, `text`) VALUES (' im Verfahren', @last_layer_id50304526, '(\'[rechtsstand]\' eq \'1000\' or \'[rechtsstand]\' eq \'2000\' or \'[rechtsstand]\' eq \'2100\' or \'[rechtsstand]\' eq \'2200\' or \'[rechtsstand]\' eq \'2300\' or \'[rechtsstand]\' eq \'2400\' or \'[rechtsstand]\' eq \'3000\')', '2', );
SET @last_class_id=LAST_INSERT_ID();

-- Style 52223834 der Class 52873956
INSERT INTO styles (`symbol`, `symbolname`, `size`, `color`, `backgroundcolor`, `outlinecolor`, `colorrange`, `datarange`, `rangeitem`, `opacity`, `minsize`, `maxsize`, `minscale`, `maxscale`, `angle`, `angleitem`, `width`, `minwidth`, `maxwidth`, `offsetx`, `offsety`, `polaroffset`, `pattern`, `geomtransform`, `gap`, `initialgap`, `linecap`, `linejoin`, `linejoinmaxsize`) VALUES (NULL, , , '190 0 40', , '-1 -1 -1', , , , '10', , , NULL, NULL, , , , NULL, NULL, NULL, NULL, , , , NULL, NULL, , , NULL);
SET @last_style_id=LAST_INSERT_ID();
-- Zuordnung Style 52223834 zu Class 52873956
INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 0);

-- Style 52175592 der Class 52873956
INSERT INTO styles (`symbol`, `symbolname`, `size`, `color`, `backgroundcolor`, `outlinecolor`, `colorrange`, `datarange`, `rangeitem`, `opacity`, `minsize`, `maxsize`, `minscale`, `maxscale`, `angle`, `angleitem`, `width`, `minwidth`, `maxwidth`, `offsetx`, `offsety`, `polaroffset`, `pattern`, `geomtransform`, `gap`, `initialgap`, `linecap`, `linejoin`, `linejoinmaxsize`) VALUES (NULL, 'Schraffur', '4', '190 0 40', , '-1 -1 -1', , , , NULL, , , NULL, NULL, '45', , '1', '1', '1', NULL, NULL, , , , NULL, NULL, , , NULL);
SET @last_style_id=LAST_INSERT_ID();
-- Zuordnung Style 52175592 zu Class 52873956
INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 1);

-- Style 52179096 der Class 52873956
INSERT INTO styles (`symbol`, `symbolname`, `size`, `color`, `backgroundcolor`, `outlinecolor`, `colorrange`, `datarange`, `rangeitem`, `opacity`, `minsize`, `maxsize`, `minscale`, `maxscale`, `angle`, `angleitem`, `width`, `minwidth`, `maxwidth`, `offsetx`, `offsety`, `polaroffset`, `pattern`, `geomtransform`, `gap`, `initialgap`, `linecap`, `linejoin`, `linejoinmaxsize`) VALUES (NULL, , , '-1 -1 -1', , '160 10 42', , , , '100', , , NULL, NULL, , , '3', '2', '3', NULL, NULL, , , , NULL, NULL, , , NULL);
SET @last_style_id=LAST_INSERT_ID();
-- Zuordnung Style 52179096 zu Class 52873956
INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 2);

-- Label 50225546 der Class 52873956
INSERT INTO labels (`font`, `type`, `color`, `outlinecolor`, `shadowcolor`, `shadowsizex`, `shadowsizey`, `backgroundcolor`, `backgroundshadowcolor`, `backgroundshadowsizex`, `backgroundshadowsizey`, `size`, `minsize`, `maxsize`, `position`, `offsetx`, `offsety`, `angle`, `anglemode`, `buffer`, `minfeaturesize`, `maxfeaturesize`, `partials`, `wrap`, `the_force`) VALUES ('arial', NULL, , , , NULL, NULL, , , NULL, NULL, '8', '6', '10', '4', '5', NULL, , NULL, NULL, NULL, NULL, NULL, NULL, NULL);
SET @last_label_id=LAST_INSERT_ID();
-- Zuordnung Label 50225546 zu Class 52873956
INSERT INTO u_labels2classes (label_id, class_id) VALUES (@last_label_id, @last_class_id);

-- Class 52920551 des Layers 50304526
INSERT INTO classes (`Name`, `Layer_ID`, `Expression`, `drawingorder`, `text`) VALUES ('in Kraft getreten', @last_layer_id50304526, '(\'[rechtsstand]\' = \'4000\')', '1', );
SET @last_class_id=LAST_INSERT_ID();

-- Style 52223833 der Class 52920551
INSERT INTO styles (`symbol`, `symbolname`, `size`, `color`, `backgroundcolor`, `outlinecolor`, `colorrange`, `datarange`, `rangeitem`, `opacity`, `minsize`, `maxsize`, `minscale`, `maxscale`, `angle`, `angleitem`, `width`, `minwidth`, `maxwidth`, `offsetx`, `offsety`, `polaroffset`, `pattern`, `geomtransform`, `gap`, `initialgap`, `linecap`, `linejoin`, `linejoinmaxsize`) VALUES (NULL, , , '240 166 0', , '-1 -1 -1', , , , '10', , , NULL, NULL, , , , NULL, NULL, NULL, NULL, , , , NULL, NULL, , , NULL);
SET @last_style_id=LAST_INSERT_ID();
-- Zuordnung Style 52223833 zu Class 52920551
INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 0);

-- Style 52223787 der Class 52920551
INSERT INTO styles (`symbol`, `symbolname`, `size`, `color`, `backgroundcolor`, `outlinecolor`, `colorrange`, `datarange`, `rangeitem`, `opacity`, `minsize`, `maxsize`, `minscale`, `maxscale`, `angle`, `angleitem`, `width`, `minwidth`, `maxwidth`, `offsetx`, `offsety`, `polaroffset`, `pattern`, `geomtransform`, `gap`, `initialgap`, `linecap`, `linejoin`, `linejoinmaxsize`) VALUES (NULL, 'Schraffur', '4', '240 166 0', , '-1 -1 -1', , , , '60', , , NULL, NULL, '45', , '1', '1', '1', NULL, NULL, , , , NULL, NULL, , , NULL);
SET @last_style_id=LAST_INSERT_ID();
-- Zuordnung Style 52223787 zu Class 52920551
INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 1);

-- Style 52223786 der Class 52920551
INSERT INTO styles (`symbol`, `symbolname`, `size`, `color`, `backgroundcolor`, `outlinecolor`, `colorrange`, `datarange`, `rangeitem`, `opacity`, `minsize`, `maxsize`, `minscale`, `maxscale`, `angle`, `angleitem`, `width`, `minwidth`, `maxwidth`, `offsetx`, `offsety`, `polaroffset`, `pattern`, `geomtransform`, `gap`, `initialgap`, `linecap`, `linejoin`, `linejoinmaxsize`) VALUES (NULL, , , '-1 -1 -1', , '227 157 0', , , , '100', , , NULL, NULL, , , '3', '2', '3', NULL, NULL, , , , NULL, NULL, , , NULL);
SET @last_style_id=LAST_INSERT_ID();
-- Zuordnung Style 52223786 zu Class 52920551
INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 2);

-- Class 52920840 des Layers 50304526
INSERT INTO classes (`Name`, `Layer_ID`, `Expression`, `drawingorder`, `text`) VALUES ('ungültig', @last_layer_id50304526, '(\'[rechtsstand]\' eq \'4500\' or \'[rechtsstand]\' eq \'5000\' or \'[rechtsstand]\' eq \'50000\' or \'[rechtsstand]\' eq \'50001\')', '3', );
SET @last_class_id=LAST_INSERT_ID();

-- Style 52223836 der Class 52920840
INSERT INTO styles (`symbol`, `symbolname`, `size`, `color`, `backgroundcolor`, `outlinecolor`, `colorrange`, `datarange`, `rangeitem`, `opacity`, `minsize`, `maxsize`, `minscale`, `maxscale`, `angle`, `angleitem`, `width`, `minwidth`, `maxwidth`, `offsetx`, `offsety`, `polaroffset`, `pattern`, `geomtransform`, `gap`, `initialgap`, `linecap`, `linejoin`, `linejoinmaxsize`) VALUES (NULL, , , '169 229 187', , '-1 -1 -1', , , , '10', , , NULL, NULL, , , , NULL, NULL, NULL, NULL, , , , NULL, NULL, , , NULL);
SET @last_style_id=LAST_INSERT_ID();
-- Zuordnung Style 52223836 zu Class 52920840
INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 0);

-- Style 52223814 der Class 52920840
INSERT INTO styles (`symbol`, `symbolname`, `size`, `color`, `backgroundcolor`, `outlinecolor`, `colorrange`, `datarange`, `rangeitem`, `opacity`, `minsize`, `maxsize`, `minscale`, `maxscale`, `angle`, `angleitem`, `width`, `minwidth`, `maxwidth`, `offsetx`, `offsety`, `polaroffset`, `pattern`, `geomtransform`, `gap`, `initialgap`, `linecap`, `linejoin`, `linejoinmaxsize`) VALUES (NULL, 'Schraffur', '4', '169 229 187', , '-1 -1 -1', , , , NULL, , , NULL, NULL, '135', , '1', '1', '1', NULL, NULL, , , , NULL, NULL, , , NULL);
SET @last_style_id=LAST_INSERT_ID();
-- Zuordnung Style 52223814 zu Class 52920840
INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 1);

-- Style 52223791 der Class 52920840
INSERT INTO styles (`symbol`, `symbolname`, `size`, `color`, `backgroundcolor`, `outlinecolor`, `colorrange`, `datarange`, `rangeitem`, `opacity`, `minsize`, `maxsize`, `minscale`, `maxscale`, `angle`, `angleitem`, `width`, `minwidth`, `maxwidth`, `offsetx`, `offsety`, `polaroffset`, `pattern`, `geomtransform`, `gap`, `initialgap`, `linecap`, `linejoin`, `linejoinmaxsize`) VALUES (NULL, 'Schraffur', '4', '169 229 187', , '-1 -1 -1', , , , NULL, , , NULL, NULL, '45', , '1', '1', '1', NULL, NULL, , , , NULL, NULL, , , NULL);
SET @last_style_id=LAST_INSERT_ID();
-- Zuordnung Style 52223791 zu Class 52920840
INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 2);

-- Style 52223809 der Class 52920840
INSERT INTO styles (`symbol`, `symbolname`, `size`, `color`, `backgroundcolor`, `outlinecolor`, `colorrange`, `datarange`, `rangeitem`, `opacity`, `minsize`, `maxsize`, `minscale`, `maxscale`, `angle`, `angleitem`, `width`, `minwidth`, `maxwidth`, `offsetx`, `offsety`, `polaroffset`, `pattern`, `geomtransform`, `gap`, `initialgap`, `linecap`, `linejoin`, `linejoinmaxsize`) VALUES (NULL, , , '-1 -1 -1', , '143 197 159', , , , NULL, , , NULL, NULL, , , '3', '2', '3', NULL, NULL, , , , NULL, NULL, , , NULL);
SET @last_style_id=LAST_INSERT_ID();
-- Zuordnung Style 52223809 zu Class 52920840
INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 3);

-- Class 52920880 des Layers 50304526
INSERT INTO classes (`Name`, `Layer_ID`, `Expression`, `drawingorder`, `text`) VALUES ('Mängelrüge', @last_layer_id50304526, , '4', );
SET @last_class_id=LAST_INSERT_ID();

-- Style 52223837 der Class 52920880
INSERT INTO styles (`symbol`, `symbolname`, `size`, `color`, `backgroundcolor`, `outlinecolor`, `colorrange`, `datarange`, `rangeitem`, `opacity`, `minsize`, `maxsize`, `minscale`, `maxscale`, `angle`, `angleitem`, `width`, `minwidth`, `maxwidth`, `offsetx`, `offsety`, `polaroffset`, `pattern`, `geomtransform`, `gap`, `initialgap`, `linecap`, `linejoin`, `linejoinmaxsize`) VALUES (NULL, , , '102 155 188', , '-1 -1 -1', , , , '10', , , NULL, NULL, , , , NULL, NULL, NULL, NULL, , , , NULL, NULL, , , NULL);
SET @last_style_id=LAST_INSERT_ID();
-- Zuordnung Style 52223837 zu Class 52920880
INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 0);

-- Style 52223828 der Class 52920880
INSERT INTO styles (`symbol`, `symbolname`, `size`, `color`, `backgroundcolor`, `outlinecolor`, `colorrange`, `datarange`, `rangeitem`, `opacity`, `minsize`, `maxsize`, `minscale`, `maxscale`, `angle`, `angleitem`, `width`, `minwidth`, `maxwidth`, `offsetx`, `offsety`, `polaroffset`, `pattern`, `geomtransform`, `gap`, `initialgap`, `linecap`, `linejoin`, `linejoinmaxsize`) VALUES (NULL, 'Schraffur', '4', '102 155 188', , '-1 -1 -1', , , , NULL, , , NULL, NULL, '45', , '1', '1', '1', NULL, NULL, , , , NULL, NULL, , , NULL);
SET @last_style_id=LAST_INSERT_ID();
-- Zuordnung Style 52223828 zu Class 52920880
INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 1);

-- Style 52223829 der Class 52920880
INSERT INTO styles (`symbol`, `symbolname`, `size`, `color`, `backgroundcolor`, `outlinecolor`, `colorrange`, `datarange`, `rangeitem`, `opacity`, `minsize`, `maxsize`, `minscale`, `maxscale`, `angle`, `angleitem`, `width`, `minwidth`, `maxwidth`, `offsetx`, `offsety`, `polaroffset`, `pattern`, `geomtransform`, `gap`, `initialgap`, `linecap`, `linejoin`, `linejoinmaxsize`) VALUES (NULL, 'Schraffur', '4', '102 155 188', , '-1 -1 -1', , , , NULL, , , NULL, NULL, '135', , '1', '1', '1', NULL, NULL, , , , NULL, NULL, , , NULL);
SET @last_style_id=LAST_INSERT_ID();
-- Zuordnung Style 52223829 zu Class 52920880
INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 2);

-- Style 52223831 der Class 52920880
INSERT INTO styles (`symbol`, `symbolname`, `size`, `color`, `backgroundcolor`, `outlinecolor`, `colorrange`, `datarange`, `rangeitem`, `opacity`, `minsize`, `maxsize`, `minscale`, `maxscale`, `angle`, `angleitem`, `width`, `minwidth`, `maxwidth`, `offsetx`, `offsety`, `polaroffset`, `pattern`, `geomtransform`, `gap`, `initialgap`, `linecap`, `linejoin`, `linejoinmaxsize`) VALUES (NULL, , , '-1 -1 -1', , '93 140 168', , , , NULL, , , NULL, NULL, , , '3', '2', '3', NULL, NULL, , , , NULL, NULL, , , NULL);
SET @last_style_id=LAST_INSERT_ID();
-- Zuordnung Style 52223831 zu Class 52920880
INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 3);

-- Replace attribute options for Layer 50304526
UPDATE layer_attributes SET options = REPLACE(options, 'layer_id=50304526', CONCAT('layer_id=', @last_layer_id50304526)) WHERE layer_id IN (@last_layer_id50304526) AND form_element_type IN ('Autovervollständigungsfeld', 'Auswahlfeld', 'Link','dynamicLink');
UPDATE layer_attributes SET options = REPLACE(options, '50304526,', CONCAT(@last_layer_id50304526, ',')) WHERE layer_id IN (@last_layer_id50304526) AND form_element_type IN ('SubFormPK', 'SubFormFK', 'SubFormEmbeddedPK');

-- Datatype 18
INSERT INTO datatypes (`name`, `schema`, `connection_id`) VALUES ('xp_verbundenerplan', 'xplan', '6');
SET @last_datatype_id18=LAST_INSERT_ID();

-- Datatype_attributes 18
INSERT INTO datatype_attributes (`datatype_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `raster_visibility`, `mandatory`, `quicksearch`, `order`, `privileg`, `query_tooltip`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `arrangement`, `labeling`) VALUES (@last_datatype_id18, 'nummer', 'nummer', , , 'text', , , '1', NULL, NULL, , 'Text', , 'Plannummer', , , , , , , NULL, '0', NULL, '3', '0', '0', '1', , , , '0', '0');

-- Datatype 14
INSERT INTO datatypes (`name`, `schema`, `connection_id`) VALUES ('xp_begruendungabschnitt', 'xplan', '6');
SET @last_datatype_id14=LAST_INSERT_ID();

-- Datatype_attributes 14
INSERT INTO datatype_attributes (`datatype_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `raster_visibility`, `mandatory`, `quicksearch`, `order`, `privileg`, `query_tooltip`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `arrangement`, `labeling`) VALUES (@last_datatype_id14, 'schluessel', 'schluessel', , , 'text', , , '1', NULL, NULL, , 'Text', , 'Schlüssel', , , , , , , NULL, '0', NULL, '1', '0', '0', '1', , , , '0', '0');

-- Datatype 12
INSERT INTO datatypes (`name`, `schema`, `connection_id`) VALUES ('xp_spezexternereferenz', 'xplan', '6');
SET @last_datatype_id12=LAST_INSERT_ID();

-- Datatype_attributes 12
INSERT INTO datatype_attributes (`datatype_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `raster_visibility`, `mandatory`, `quicksearch`, `order`, `privileg`, `query_tooltip`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `arrangement`, `labeling`) VALUES (@last_datatype_id12, 'art', 'art', , , 'text', , , '1', NULL, NULL, , 'Auswahlfeld', 'select \'Dokument\' as value, \'Dokument\' as output\r\nunion\r\nselect \'PlanMitGeoreferenz\' as value, \'Plan mit Georeferenz\' as output', 'Art', , , , , , , NULL, '0', NULL, '2', '0', '0', '1', , , , '0', '0');

-- Datatype 17
INSERT INTO datatypes (`name`, `schema`, `connection_id`) VALUES ('xp_generattribut', 'xplan', '6');
SET @last_datatype_id17=LAST_INSERT_ID();

-- Datatype_attributes 17
INSERT INTO datatype_attributes (`datatype_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `raster_visibility`, `mandatory`, `quicksearch`, `order`, `privileg`, `query_tooltip`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `arrangement`, `labeling`) VALUES (@last_datatype_id17, 'name', 'name', , , 'text', , , '1', NULL, NULL, , 'Text', , 'Name', , , , , , , NULL, '0', NULL, '1', '0', '0', '1', , , , '0', '0');

-- Datatype 11
INSERT INTO datatypes (`name`, `schema`, `connection_id`) VALUES ('xp_gemeinde', 'xplan', '6');
SET @last_datatype_id11=LAST_INSERT_ID();

-- Datatype_attributes 11
INSERT INTO datatype_attributes (`datatype_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `raster_visibility`, `mandatory`, `quicksearch`, `order`, `privileg`, `query_tooltip`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `arrangement`, `labeling`) VALUES (@last_datatype_id11, 'ags', 'ags', , , 'text', , , '1', NULL, NULL, , 'Text', , 'amtlicher Gemeindeschlüssel', , , , , , , NULL, '0', NULL, '1', '0', '0', '1', , , , '0', '0');

-- Datatype 15
INSERT INTO datatypes (`name`, `schema`, `connection_id`) VALUES ('xp_plangeber', 'xplan', '6');
SET @last_datatype_id15=LAST_INSERT_ID();

-- Datatype_attributes 15
INSERT INTO datatype_attributes (`datatype_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `raster_visibility`, `mandatory`, `quicksearch`, `order`, `privileg`, `query_tooltip`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `arrangement`, `labeling`) VALUES (@last_datatype_id15, 'kennziffer', 'kennziffer', , , 'text', , , '1', NULL, NULL, , 'Text', , 'Kennziffer', , , , , , , NULL, NULL, NULL, '2', '0', '0', '1', , , , '0', '0');

-- Datatype 13
INSERT INTO datatypes (`name`, `schema`, `connection_id`) VALUES ('xp_textabschnitt', 'xplan', '6');
SET @last_datatype_id13=LAST_INSERT_ID();

-- Datatype_attributes 13
INSERT INTO datatype_attributes (`datatype_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `raster_visibility`, `mandatory`, `quicksearch`, `order`, `privileg`, `query_tooltip`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `arrangement`, `labeling`) VALUES (@last_datatype_id13, 'gesetzlichegrundlage', 'gesetzlichegrundlage', , , 'text', , , '1', NULL, NULL, , 'Text', , 'gesetzliche Grundlage', , , , , , , NULL, '0', NULL, '2', '0', '0', '1', , , , '0', '0');

-- Datatype 16
INSERT INTO datatypes (`name`, `schema`, `connection_id`) VALUES ('xp_verfahrensmerkmal', 'xplan', '6');
SET @last_datatype_id16=LAST_INSERT_ID();

-- Datatype_attributes 16
INSERT INTO datatype_attributes (`datatype_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `raster_visibility`, `mandatory`, `quicksearch`, `order`, `privileg`, `query_tooltip`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `arrangement`, `labeling`) VALUES (@last_datatype_id16, 'datum', 'datum', , , 'date', , , '1', NULL, NULL, , 'Text', , 'Datum', , , , , , , NULL, '0', NULL, '2', '0', '0', '1', , , , '0', '0');