[Mapbender-commits] r7839 -
branches/2.7/resources/db/pgsql/UTF-8/update
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon May 30 08:48:08 EDT 2011
Author: astrid_emde
Date: 2011-05-30 05:48:08 -0700 (Mon, 30 May 2011)
New Revision: 7839
Modified:
branches/2.7/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: branches/2.7/resources/db/pgsql/UTF-8/update/update_2.6.2_to_2.7rc1_pgsql_UTF-8.sql
===================================================================
--- branches/2.7/resources/db/pgsql/UTF-8/update/update_2.6.2_to_2.7rc1_pgsql_UTF-8.sql 2011-05-30 11:32:35 UTC (rev 7838)
+++ branches/2.7/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)
@@ -2684,6 +2684,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