[Mapbender-commits] r7840 - trunk/mapbender/resources/db/pgsql/UTF-8/update

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon May 30 08:48:59 EDT 2011


Author: astrid_emde
Date: 2011-05-30 05:48:59 -0700 (Mon, 30 May 2011)
New Revision: 7840

Modified:
   trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.2_to_2.7rc1_pgsql_UTF-8.sql
Log:
#813 layer_load_count delete layer_ids that do not exit anymore

Modified: trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.2_to_2.7rc1_pgsql_UTF-8.sql
===================================================================
--- trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.2_to_2.7rc1_pgsql_UTF-8.sql	2011-05-30 12:48:08 UTC (rev 7839)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.2_to_2.7rc1_pgsql_UTF-8.sql	2011-05-30 12:48:59 UTC (rev 7840)
@@ -2683,6 +2683,10 @@
 -- overview: initWms.php is replaced by initWmcObj.php
 UPDATE gui_element SET e_mb_mod = '../../lib/history.js,map_obj.js,map.js,wms.js,wfs_obj.js,initWmcObj.php' WHERE e_id = 'overview';
 
+-- Delete layer_id in layer_load_count that do not exist in layer before constraint is created
+DELETE FROM layer_load_count WHERE not exists ( SELECT layer.layer_id 
+FROM layer WHERE layer_load_count.fkey_layer_id = layer.layer_id );
+
 -- missing foreign key in layer_load_count
 ALTER TABLE ONLY layer_load_count
     ADD CONSTRAINT layer_load_count_fkey_layer_id_fkey FOREIGN KEY (fkey_layer_id) REFERENCES layer (layer_id) ON UPDATE CASCADE ON DELETE CASCADE;



More information about the Mapbender_commits mailing list