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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Aug 10 08:12:34 PDT 2016


Author: armin11
Date: 2016-08-10 08:12:34 -0700 (Wed, 10 Aug 2016)
New Revision: 9555

Modified:
   trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql
Log:
Enhancement to handle layer dimensions in mapbenders database

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	2016-08-10 15:11:04 UTC (rev 9554)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql	2016-08-10 15:12:34 UTC (rev 9555)
@@ -1165,3 +1165,56 @@
 
 UPDATE gui_element SET e_target = 'editMaintenance_collection, reindexWMS_collection,reindexWFS_collection,reindexDATASET_collection,Start_Monitor_for_WMS_collection' WHERE fkey_gui_id = 'PortalAdmin_DE' AND e_id = 'menu_maintenance';
 
+--dirty fix for more than one entry in wfs_termsofuse - should not happen under normal circumstances 
+-- Function: f_getwfs_tou(integer)
+
+-- DROP FUNCTION f_getwfs_tou(integer);
+
+CREATE OR REPLACE FUNCTION f_getwfs_tou(integer)
+  RETURNS integer AS
+$BODY$
+DECLARE
+   wfs_tou int4;
+BEGIN
+wfs_tou := fkey_termsofuse_id from wfs_termsofuse where wfs_termsofuse.fkey_wfs_id=$1 LIMIT 1; 
+RETURN wfs_tou;
+
+END;
+$BODY$
+  LANGUAGE plpgsql VOLATILE
+  COST 100;
+ALTER FUNCTION f_getwfs_tou(integer)
+  OWNER TO postgres;
+
+-- fix for search featuretype view
+UPDATE wfs_featuretype SET featuretype_latlon_bbox='-180,-90,180,90' WHERE featuretype_latlon_bbox = ',,,';
+
+--View to pull keywords as suggestions for catalogue search
+CREATE VIEW keyword_search_view AS SELECT keyword, to_tsvector('german', keyword) as keyword_ts, replace(replace(replace(replace(replace(replace(replace(UPPER(keyword),'Ä','AE'),'ß','SS'),'Ö','OE'),'Ü','UE'),'ä','AE'),'ü','UE'),'ö','OE') as keyword_upper FROM keyword;
+
+-- Table: layer_dimension
+
+-- DROP TABLE layer_dimension;
+
+CREATE TABLE layer_dimension
+(
+  fkey_layer_id integer NOT NULL DEFAULT 0,
+  name character varying(512) NOT NULL DEFAULT ''::character varying,
+  units character varying(512) NOT NULL DEFAULT ''::character varying,
+  unitSymbol character varying(512) DEFAULT ''::character varying,
+  "default" character varying(512) DEFAULT ''::character varying,
+  multipleValues character varying(512)  DEFAULT ''::character varying,
+  nearestValue character varying(512) DEFAULT ''::character varying,
+  current character varying(512) DEFAULT ''::character varying,
+  extent character varying(512) NOT NULL DEFAULT ''::character varying,
+  CONSTRAINT layer_dimension_ibfk_1 FOREIGN KEY (fkey_layer_id)
+      REFERENCES layer (layer_id) MATCH SIMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE
+)
+WITH (
+  OIDS=FALSE
+);
+ALTER TABLE layer_dimension
+  OWNER TO postgres;
+
+



More information about the Mapbender_commits mailing list