[Mapbender-commits] r8688 - trunk/mapbender/resources/db/pgsql/UTF-8/update
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Aug 21 22:56:13 PDT 2013
Author: armin11
Date: 2013-08-21 22:56:12 -0700 (Wed, 21 Aug 2013)
New Revision: 8688
Modified:
trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.3_to_2.7.4_pgsql_UTF-8.sql
Log:
Extend datamodel to allow inheritance of classification for layer/featuretypes from coupled metadata
Modified: trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.3_to_2.7.4_pgsql_UTF-8.sql
===================================================================
--- trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.3_to_2.7.4_pgsql_UTF-8.sql 2013-08-16 14:07:43 UTC (rev 8687)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.3_to_2.7.4_pgsql_UTF-8.sql 2013-08-22 05:56:12 UTC (rev 8688)
@@ -301,4 +301,90 @@
gui_element.fkey_gui_id
NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE fkey_e_id = 'printPDF' AND var_name = 'printLegend');
+-- allow inheritance of classification for coupled resources (layer/featuretype)
+-- layer ***********************************************************************
+-- Column: fkey_metadata_id
+-- ALTER TABLE layer_inspire_category DROP COLUMN fkey_metadata_id;
+
+ALTER TABLE layer_inspire_category ADD COLUMN fkey_metadata_id integer;
+
+-- Foreign Key: layer_inspire_category_fkey_metadata_id_fkey
+
+-- ALTER TABLE layer_inspire_category DROP CONSTRAINT layer_inspire_category_fkey_metadata_id_fkey;
+
+ALTER TABLE layer_inspire_category
+ ADD CONSTRAINT layer_inspire_category_fkey_metadata_id_fkey FOREIGN KEY (fkey_metadata_id)
+ REFERENCES mb_metadata (metadata_id) MATCH SIMPLE
+ ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+-- ALTER TABLE layer_md_topic_category DROP COLUMN fkey_metadata_id;
+
+ALTER TABLE layer_md_topic_category ADD COLUMN fkey_metadata_id integer;
+
+-- Foreign Key: layer_md_topic_category_fkey_metadata_id_fkey
+
+-- ALTER TABLE layer_md_topic_category DROP CONSTRAINT layer_md_topic_category_fkey_metadata_id_fkey;
+
+ALTER TABLE layer_md_topic_category
+ ADD CONSTRAINT layer_md_topic_category_fkey_metadata_id_fkey FOREIGN KEY (fkey_metadata_id)
+ REFERENCES mb_metadata (metadata_id) MATCH SIMPLE
+ ON UPDATE CASCADE ON DELETE CASCADE;
+
+-- ALTER TABLE layer_custom_category DROP COLUMN fkey_metadata_id;
+
+ALTER TABLE layer_custom_category ADD COLUMN fkey_metadata_id integer;
+
+-- Foreign Key: layer_custom_category_fkey_metadata_id_fkey
+
+-- ALTER TABLE layer_custom_category DROP CONSTRAINT layer_custom_category_fkey_metadata_id_fkey;
+
+ALTER TABLE layer_custom_category
+ ADD CONSTRAINT layer_custom_category_fkey_metadata_id_fkey FOREIGN KEY (fkey_metadata_id)
+ REFERENCES mb_metadata (metadata_id) MATCH SIMPLE
+ ON UPDATE CASCADE ON DELETE CASCADE;
+
+-- featuretype ***********************************************************************
+-- Column: fkey_metadata_id
+
+-- ALTER TABLE wfs_featuretype_inspire_category DROP COLUMN fkey_metadata_id;
+
+ALTER TABLE wfs_featuretype_inspire_category ADD COLUMN fkey_metadata_id integer;
+
+-- Foreign Key: wfs_featuretype_inspire_category_fkey_metadata_id_fkey
+
+-- ALTER TABLE wfs_featuretype_inspire_category DROP CONSTRAINT wfs_featuretype_inspire_category_fkey_metadata_id_fkey;
+
+ALTER TABLE wfs_featuretype_inspire_category
+ ADD CONSTRAINT wfs_featuretype_inspire_category_fkey_metadata_id_fkey FOREIGN KEY (fkey_metadata_id)
+ REFERENCES mb_metadata (metadata_id) MATCH SIMPLE
+ ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+-- ALTER TABLE wfs_featuretype_md_topic_category DROP COLUMN fkey_metadata_id;
+
+ALTER TABLE wfs_featuretype_md_topic_category ADD COLUMN fkey_metadata_id integer;
+
+-- Foreign Key: wfs_featuretype_md_topic_category_fkey_metadata_id_fkey
+
+-- ALTER TABLE wfs_featuretype_md_topic_category DROP CONSTRAINT wfs_featuretype_md_topic_category_fkey_metadata_id_fkey;
+
+ALTER TABLE wfs_featuretype_md_topic_category
+ ADD CONSTRAINT wfs_featuretype_md_topic_category_fkey_metadata_id_fkey FOREIGN KEY (fkey_metadata_id)
+ REFERENCES mb_metadata (metadata_id) MATCH SIMPLE
+ ON UPDATE CASCADE ON DELETE CASCADE;
+
+-- ALTER TABLE wfs_featuretype_custom_category DROP COLUMN fkey_metadata_id;
+
+ALTER TABLE wfs_featuretype_custom_category ADD COLUMN fkey_metadata_id integer;
+
+-- Foreign Key: wfs_featuretype_custom_category_fkey_metadata_id_fkey
+
+-- ALTER TABLE wfs_featuretype_custom_category DROP CONSTRAINT wfs_featuretype_custom_category_fkey_metadata_id_fkey;
+
+ALTER TABLE wfs_featuretype_custom_category
+ ADD CONSTRAINT wfs_featuretype_custom_category_fkey_metadata_id_fkey FOREIGN KEY (fkey_metadata_id)
+ REFERENCES mb_metadata (metadata_id) MATCH SIMPLE
+ ON UPDATE CASCADE ON DELETE CASCADE;
+
More information about the Mapbender_commits
mailing list