[Mapbender-commits] r8742 - trunk/mapbender/resources/db/pgsql/UTF-8/update
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Nov 28 04:44:55 PST 2013
Author: armin11
Date: 2013-11-28 04:44:54 -0800 (Thu, 28 Nov 2013)
New Revision: 8742
Modified:
trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql
Log:
Bugfix in order of sql
Modified: trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql
===================================================================
--- trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql 2013-11-28 12:39:19 UTC (rev 8741)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql 2013-11-28 12:44:54 UTC (rev 8742)
@@ -9,23 +9,6 @@
ALTER TABLE wfs DROP COLUMN inspire_daily_requests;
ALTER TABLE wfs ADD COLUMN inspire_annual_requests bigint;
---new option to search for datasets in the internal mb_metadata table
--- View: search_dataset_view
-
--- DROP VIEW search_dataset_view;
-
-CREATE OR REPLACE VIEW search_dataset_view AS
- SELECT dataset_dep.fkey_mb_user_id AS user_id, dataset_dep.dataset_id, dataset_dep.srs AS dataset_srs, dataset_dep.title, dataset_dep.abstract AS dataset_abstract, f_collect_searchtext_dataset(dataset_dep.dataset_id) AS searchtext, dataset_dep.dataset_timestamp, dataset_dep.department, dataset_dep.mb_group_name, dataset_dep.mb_group_title, dataset_dep.mb_group_country, 0 AS load_count, dataset_dep.mb_group_stateorprovince, f_collect_inspire_cat_dataset(dataset_dep.dataset_id) AS md_inspire_cats, f_collect_custom_cat_dataset(dataset_dep.dataset_id) AS md_custom_cats, f_collect_topic_cat_dataset(dataset_dep.dataset_id) AS md_topic_cats, dataset_dep.bbox, dataset_dep.mb_group_logo_path
- FROM ( SELECT mb_metadata.the_geom as bbox, mb_metadata.ref_system as srs, mb_metadata.metadata_id AS dataset_id, mb_metadata.title, mb_metadata.abstract, mb_metadata.lastchanged as dataset_timestamp, mb_metadata.fkey_mb_user_id, user_dep.mb_group_id AS department, user_dep.mb_group_name, user_dep.mb_group_title, user_dep.mb_group_country, user_dep.mb_group_stateorprovince, user_dep.mb_group_logo_path
- FROM ( SELECT registrating_groups.fkey_mb_user_id AS mb_user_id, mb_group.mb_group_id, mb_group.mb_group_name, mb_group.mb_group_title, mb_group.mb_group_country, mb_group.mb_group_stateorprovince, mb_group.mb_group_logo_path
- FROM registrating_groups, mb_group
- WHERE registrating_groups.fkey_mb_group_id = mb_group.mb_group_id) user_dep, mb_metadata
- WHERE user_dep.mb_user_id = mb_metadata.fkey_mb_user_id) dataset_dep
- ORDER BY dataset_dep.dataset_id;
-
-ALTER TABLE search_dataset_view
- OWNER TO postgres;
-
-- Function: f_collect_custom_cat_dataset(integer)
-- DROP FUNCTION f_collect_custom_cat_dataset(integer);
@@ -145,6 +128,23 @@
-- DROP FUNCTION f_collect_topic_cat_dataset(integer);
-- DROP FUNCTION f_collect_searchtext_dataset(integer);
+--new option to search for datasets in the internal mb_metadata table
+-- View: search_dataset_view
+
+-- DROP VIEW search_dataset_view;
+
+CREATE OR REPLACE VIEW search_dataset_view AS
+ SELECT dataset_dep.fkey_mb_user_id AS user_id, dataset_dep.dataset_id, dataset_dep.srs AS dataset_srs, dataset_dep.title, dataset_dep.abstract AS dataset_abstract, f_collect_searchtext_dataset(dataset_dep.dataset_id) AS searchtext, dataset_dep.dataset_timestamp, dataset_dep.department, dataset_dep.mb_group_name, dataset_dep.mb_group_title, dataset_dep.mb_group_country, 0 AS load_count, dataset_dep.mb_group_stateorprovince, f_collect_inspire_cat_dataset(dataset_dep.dataset_id) AS md_inspire_cats, f_collect_custom_cat_dataset(dataset_dep.dataset_id) AS md_custom_cats, f_collect_topic_cat_dataset(dataset_dep.dataset_id) AS md_topic_cats, dataset_dep.bbox, dataset_dep.mb_group_logo_path
+ FROM ( SELECT mb_metadata.the_geom as bbox, mb_metadata.ref_system as srs, mb_metadata.metadata_id AS dataset_id, mb_metadata.title, mb_metadata.abstract, mb_metadata.lastchanged as dataset_timestamp, mb_metadata.fkey_mb_user_id, user_dep.mb_group_id AS department, user_dep.mb_group_name, user_dep.mb_group_title, user_dep.mb_group_country, user_dep.mb_group_stateorprovince, user_dep.mb_group_logo_path
+ FROM ( SELECT registrating_groups.fkey_mb_user_id AS mb_user_id, mb_group.mb_group_id, mb_group.mb_group_name, mb_group.mb_group_title, mb_group.mb_group_country, mb_group.mb_group_stateorprovince, mb_group.mb_group_logo_path
+ FROM registrating_groups, mb_group
+ WHERE registrating_groups.fkey_mb_group_id = mb_group.mb_group_id) user_dep, mb_metadata
+ WHERE user_dep.mb_user_id = mb_metadata.fkey_mb_user_id) dataset_dep
+ ORDER BY dataset_dep.dataset_id;
+
+ALTER TABLE search_dataset_view
+ OWNER TO postgres;
+
ALTER TABLE custom_category ALTER COLUMN custom_category_key TYPE varchar(255);
-- Column: inspire_download
More information about the Mapbender_commits
mailing list