GLE-Layer-Strassen: Unterschied zwischen den Versionen
Aus kvwmap
Wirsi (Diskussion | Beiträge) |
Wirsi (Diskussion | Beiträge) |
||
Zeile 59: | Zeile 59: | ||
SET @last_style_id=LAST_INSERT_ID(); | SET @last_style_id=LAST_INSERT_ID(); | ||
INSERT INTO u_styles2classes (style_id, class_id) VALUES (@last_style_id, @last_class_id); | INSERT INTO u_styles2classes (style_id, class_id) VALUES (@last_style_id, @last_class_id); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
INSERT INTO layer (`Name`,`Datentyp`,`Gruppe`,`pfad`,`Data`,`schema`,`document_path`,`tileindex`,`tileitem`,`labelangleitem`,`labelitem`,`labelmaxscale`,`labelminscale`,`labelrequires`,`connection`,`printconnection`,`connectiontype`,`classitem`,`filteritem`,`tolerance`,`toleranceunits`,`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`,`selectiontype`,`querymap`,`logconsume`) VALUES('Netzknoten Dokumente','5',@group_id,'select id, nk, subnr, datei, datum from gd_netzknoten_bilder where 1=1','','','','','','','',NULL,NULL,'',@connection,'','6','','id','3','pixels','25833','','0',NULL,NULL,'-1','-1','','EPSG:25833','dokumente','1.1.0','image/png','60','','','','','1',''); | INSERT INTO layer (`Name`,`Datentyp`,`Gruppe`,`pfad`,`Data`,`schema`,`document_path`,`tileindex`,`tileitem`,`labelangleitem`,`labelitem`,`labelmaxscale`,`labelminscale`,`labelrequires`,`connection`,`printconnection`,`connectiontype`,`classitem`,`filteritem`,`tolerance`,`toleranceunits`,`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`,`selectiontype`,`querymap`,`logconsume`) VALUES('Netzknoten Dokumente','5',@group_id,'select id, nk, subnr, datei, datum from gd_netzknoten_bilder where 1=1','','','','','','','',NULL,NULL,'',@connection,'','6','','id','3','pixels','25833','','0',NULL,NULL,'-1','-1','','EPSG:25833','dokumente','1.1.0','image/png','60','','','','','1',''); | ||
Zeile 74: | Zeile 68: | ||
INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id88,'subnr','subnr','gd_netzknoten_bilder','gd_netzknoten_bilder','int4','','','1',NULL,'Text','','Subnr.','','2'); | INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id88,'subnr','subnr','gd_netzknoten_bilder','gd_netzknoten_bilder','int4','','','1',NULL,'Text','','Subnr.','','2'); | ||
− | UPDATE layer_attributes SET options = REPLACE(options, '88', @last_layer_id88) WHERE layer_id IN(88) AND type IN ('SubFormPK', 'SubFormFK', 'SubFormEmbeddedPK'); | + | UPDATE layer_attributes SET options = REPLACE(options, '86', @last_layer_id86) WHERE layer_id IN(86,88) AND type IN ('SubFormPK', 'SubFormFK', 'SubFormEmbeddedPK'); |
+ | UPDATE layer_attributes SET options = REPLACE(options, '88', @last_layer_id88) WHERE layer_id IN(86,88) AND type IN ('SubFormPK', 'SubFormFK', 'SubFormEmbeddedPK'); | ||
</pre> | </pre> |
Version vom 13. September 2011, 16:00 Uhr
SET @group_id = 1; SET @connection = 'user=xxxx password=xxxx dbname=kvwmapsp'; INSERT INTO layer (`Name`,`Datentyp`,`Gruppe`,`pfad`,`Data`,`schema`,`document_path`,`tileindex`,`tileitem`,`labelangleitem`,`labelitem`,`labelmaxscale`,`labelminscale`,`labelrequires`,`connection`,`printconnection`,`connectiontype`,`classitem`,`filteritem`,`tolerance`,`toleranceunits`,`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`,`selectiontype`,`querymap`,`logconsume`) VALUES('Kreisstraßen (OVP)','1',@group_id,'select * from gd_lk_kreisstrassen where 1=1','the_geom from (select oid, * from gd_lk_kreisstrassen where 1=1) as foo using unique oid using srid=25833','','','','','','',NULL,NULL,'',@connection,'','6','','oid','5','pixels','25833','','1',NULL,'106',NULL,NULL,'','EPSG:25833','lk-ovp_kreisstrassen','1.1.1','image/png','60','','','','','1',''); SET @last_layer_id84=LAST_INSERT_ID(); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id84,'abs','abs','gd_lk_kreisstrassen','gd_lk_kreisstrassen','bpchar','','','1',NULL,'Text','','Abschnitt','','2'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id84,'abschnittslaenge','abschnittslaenge','gd_lk_kreisstrassen','gd_lk_kreisstrassen','int4','','','1',NULL,'Text','','Länge','','9'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id84,'abschnittsnummer','abschnittsnummer','gd_lk_kreisstrassen','gd_lk_kreisstrassen','bpchar','','','1',NULL,'Text','','Abschnitt','','8'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id84,'anfangsnetzknoten','anfangsnetzknoten','gd_lk_kreisstrassen','gd_lk_kreisstrassen','bpchar','','','1',NULL,'Text','','Anfangsknoten','','4'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id84,'bemerkung','bemerkung','gd_lk_kreisstrassen','gd_lk_kreisstrassen','bpchar','','','1',NULL,'Text','','Bemerkung','','10'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id84,'datum','datum','gd_lk_kreisstrassen','gd_lk_kreisstrassen','date','','','1',NULL,'Text','','Datum','','11'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id84,'endnetzknoten','endnetzknoten','gd_lk_kreisstrassen','gd_lk_kreisstrassen','bpchar','','','1',NULL,'Text','','Endknoten','','5'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id84,'nachnp','nachnp','gd_lk_kreisstrassen','gd_lk_kreisstrassen','bpchar','','','1',NULL,'Text','','nach Netzpkt.','','14'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id84,'ogc_fid','ogc_fid','gd_lk_kreisstrassen','gd_lk_kreisstrassen','int4','','','1',NULL,'Text','','FID','','0'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id84,'strassenart','strassenart','gd_lk_kreisstrassen','gd_lk_kreisstrassen','bpchar','','','1',NULL,'Text','','Straßenart','','6'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id84,'strassenname','strassenname','gd_lk_kreisstrassen','gd_lk_kreisstrassen','bpchar','','','1',NULL,'Text','','Straßenname','','3'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id84,'strassennummer','strassennummer','gd_lk_kreisstrassen','gd_lk_kreisstrassen','bpchar','','','1',NULL,'Text','','Nummer','','7'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id84,'the_geom','the_geom','gd_lk_kreisstrassen','gd_lk_kreisstrassen','geometry','LINESTRING','','1',NULL,'Geometrie','','','','1'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id84,'ui_k','ui_k','gd_lk_kreisstrassen','gd_lk_kreisstrassen','bpchar','','','1',NULL,'Text','','ui k','','12'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id84,'vonnp','vonnp','gd_lk_kreisstrassen','gd_lk_kreisstrassen','bpchar','','','1',NULL,'Text','','von Netzpkt.','','13'); INSERT INTO classes (`Name`,`Layer_ID`,`Expression`,`drawingorder`,`text`) VALUES('Kreisstraßen',@last_layer_id84,'','1',''); SET @last_class_id=LAST_INSERT_ID(); INSERT INTO styles (`symbol`,`symbolname`,`size`,`color`,`backgroundcolor`,`outlinecolor`,`minsize`,`maxsize`,`angle`,`angleitem`,`antialias`,`width`,`minwidth`,`maxwidth`,`sizeitem`) VALUES(NULL,'filledcircle','4','255 60 60','','','2','6','360','',NULL,NULL,NULL,NULL,''); SET @last_style_id=LAST_INSERT_ID(); INSERT INTO u_styles2classes (style_id, class_id) VALUES (@last_style_id, @last_class_id); INSERT INTO styles (`symbol`,`symbolname`,`size`,`color`,`backgroundcolor`,`outlinecolor`,`minsize`,`maxsize`,`angle`,`angleitem`,`antialias`,`width`,`minwidth`,`maxwidth`,`sizeitem`) VALUES(NULL,'filledcircle','6','70 70 70','','','4','8','360','',NULL,NULL,NULL,NULL,''); SET @last_style_id=LAST_INSERT_ID(); INSERT INTO u_styles2classes (style_id, class_id) VALUES (@last_style_id, @last_class_id); UPDATE layer_attributes SET options = REPLACE(options, '84', @last_layer_id84) WHERE layer_id IN(84) AND type IN ('SubFormPK', 'SubFormFK', 'SubFormEmbeddedPK'); SET @group_id = 1; SET @connection = 'user=xxxx password=xxxx dbname=kvwmapsp'; INSERT INTO layer (`Name`,`Datentyp`,`Gruppe`,`pfad`,`Data`,`schema`,`document_path`,`tileindex`,`tileitem`,`labelangleitem`,`labelitem`,`labelmaxscale`,`labelminscale`,`labelrequires`,`connection`,`printconnection`,`connectiontype`,`classitem`,`filteritem`,`tolerance`,`toleranceunits`,`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`,`selectiontype`,`querymap`,`logconsume`) VALUES('Netzknoten','0',@group_id,'select nk,bereich,bindung,netzknoten,name,kreisverkehr,fiktiv,planum,bw,datum,bemerkung,the_geom,\'\' as dokumente from gd_netzknoten where 1=1','the_geom from (select oid, * from gd_netzknoten where 1=1) as foo using unique oid using srid=25833','','','','','','',NULL,NULL,'',@connection,'','6','','oid','5','pixels','25833','','1',NULL,'110','99','200010','','EPSG:25833','netzknoten','1.1.1','image/png','60','','','','','0',''); SET @last_layer_id86=LAST_INSERT_ID(); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id86,'bemerkung','bemerkung','gd_netzknoten','gd_netzknoten','bpchar','','','1',NULL,'Text','','Bemerkung','','10'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id86,'bereich','bereich','gd_netzknoten','gd_netzknoten','int4','','','1',NULL,'Text','','Bereich','','1'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id86,'bindung','bindung','gd_netzknoten','gd_netzknoten','int4','','','1',NULL,'Text','','Bindung','','2'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id86,'bw','bw','gd_netzknoten','gd_netzknoten','bpchar','','','1',NULL,'Text','','Bauwerk','','8'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id86,'datum','datum','gd_netzknoten','gd_netzknoten','date','','','1',NULL,'Text','','Datum','','9'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id86,'dokumente','dokumente','','','unknown','','',NULL,NULL,'SubFormEmbeddedPK','88,nk,datei;embedded','Lageskizze','','12'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id86,'fiktiv','fiktiv','gd_netzknoten','gd_netzknoten','bpchar','','','1',NULL,'Text','','Fiktiv','','6'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id86,'kreisverkehr','kreisverkehr','gd_netzknoten','gd_netzknoten','bpchar','','','1',NULL,'Text','','Kreisverkehr','','5'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id86,'name','name','gd_netzknoten','gd_netzknoten','bpchar','','','1',NULL,'Text','','Name','','4'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id86,'netzknoten','netzknoten','gd_netzknoten','gd_netzknoten','bpchar','','','1',NULL,'Text','','Netzknoten','','3'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id86,'nk','nk','gd_netzknoten','gd_netzknoten','int4','','','0',NULL,'Text','','ID','','0'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id86,'planum','planum','gd_netzknoten','gd_netzknoten','bpchar','','','1',NULL,'Text','','Knotenart','','7'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id86,'the_geom','the_geom','gd_netzknoten','gd_netzknoten','geometry','POINT','','1',NULL,'Geometrie','','','','11'); INSERT INTO classes (`Name`,`Layer_ID`,`Expression`,`drawingorder`,`text`) VALUES('Netzknoten',@last_layer_id86,'','1',''); SET @last_class_id=LAST_INSERT_ID(); INSERT INTO styles (`symbol`,`symbolname`,`size`,`color`,`backgroundcolor`,`outlinecolor`,`minsize`,`maxsize`,`angle`,`angleitem`,`antialias`,`width`,`minwidth`,`maxwidth`,`sizeitem`) VALUES(NULL,'filledcircle','7','255 180 20','','255 180 20',NULL,'7','360','',NULL,NULL,NULL,NULL,''); SET @last_style_id=LAST_INSERT_ID(); INSERT INTO u_styles2classes (style_id, class_id) VALUES (@last_style_id, @last_class_id); INSERT INTO styles (`symbol`,`symbolname`,`size`,`color`,`backgroundcolor`,`outlinecolor`,`minsize`,`maxsize`,`angle`,`angleitem`,`antialias`,`width`,`minwidth`,`maxwidth`,`sizeitem`) VALUES(NULL,'circle','9','-1 -1 -1','','0 0 0',NULL,'9','360','',NULL,NULL,NULL,NULL,''); SET @last_style_id=LAST_INSERT_ID(); INSERT INTO u_styles2classes (style_id, class_id) VALUES (@last_style_id, @last_class_id); INSERT INTO layer (`Name`,`Datentyp`,`Gruppe`,`pfad`,`Data`,`schema`,`document_path`,`tileindex`,`tileitem`,`labelangleitem`,`labelitem`,`labelmaxscale`,`labelminscale`,`labelrequires`,`connection`,`printconnection`,`connectiontype`,`classitem`,`filteritem`,`tolerance`,`toleranceunits`,`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`,`selectiontype`,`querymap`,`logconsume`) VALUES('Netzknoten Dokumente','5',@group_id,'select id, nk, subnr, datei, datum from gd_netzknoten_bilder where 1=1','','','','','','','',NULL,NULL,'',@connection,'','6','','id','3','pixels','25833','','0',NULL,NULL,'-1','-1','','EPSG:25833','dokumente','1.1.0','image/png','60','','','','','1',''); SET @last_layer_id88=LAST_INSERT_ID(); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id88,'datei','datei','gd_netzknoten_bilder','gd_netzknoten_bilder','bpchar','','','1',NULL,'Dokument','','Dokument','','3'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id88,'datum','datum','gd_netzknoten_bilder','gd_netzknoten_bilder','date','','','1',NULL,'Text','','Datum','','4'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id88,'id','id','gd_netzknoten_bilder','gd_netzknoten_bilder','int4','','','1',NULL,'Text','','GID','','0'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id88,'nk','nk','gd_netzknoten_bilder','gd_netzknoten_bilder','int4','','','1',NULL,'Text','','Netzkn.','','1'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`) VALUES(@last_layer_id88,'subnr','subnr','gd_netzknoten_bilder','gd_netzknoten_bilder','int4','','','1',NULL,'Text','','Subnr.','','2'); UPDATE layer_attributes SET options = REPLACE(options, '86', @last_layer_id86) WHERE layer_id IN(86,88) AND type IN ('SubFormPK', 'SubFormFK', 'SubFormEmbeddedPK'); UPDATE layer_attributes SET options = REPLACE(options, '88', @last_layer_id88) WHERE layer_id IN(86,88) AND type IN ('SubFormPK', 'SubFormFK', 'SubFormEmbeddedPK');