[Mapbender-commits] r1800 - trunk/mapbender/resources/db/update
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Nov 13 11:16:16 EST 2007
Author: astrid_emde
Date: 2007-11-13 11:16:16 -0500 (Tue, 13 Nov 2007)
New Revision: 1800
Modified:
trunk/mapbender/resources/db/update/update_postgresql_db.sql
Log:
dbchanges added for Version 2.5
Modified: trunk/mapbender/resources/db/update/update_postgresql_db.sql
===================================================================
--- trunk/mapbender/resources/db/update/update_postgresql_db.sql 2007-11-12 11:01:30 UTC (rev 1799)
+++ trunk/mapbender/resources/db/update/update_postgresql_db.sql 2007-11-13 16:16:16 UTC (rev 1800)
@@ -8,16 +8,109 @@
-- How to install plpgsql?
-- createlang plpgsql mapbender
+
--
+-- table mb_monitort: new columns for mb_monitor
+--
+ALTER TABLE mb_monitor ADD COLUMN image int4;
+ALTER TABLE mb_monitor ADD COLUMN map_url varchar(2048);
+
+
+
+--
+-- WFS database handling
+-- enhancement of the datadase structure concerning WFS metadata (same solution like for WMS)
+--
+ALTER table wfs add wfs_getcapabilities_doc text;
+ALTER table wfs add wfs_upload_url character varying(255);
+ALTER table wfs add fees character varying(255);
+ALTER table wfs add accessconstraints text;
+ALTER table wfs add individualname character varying(255);
+ALTER table wfs add positionname character varying(255);
+ALTER table wfs add providername character varying(255);
+ALTER table wfs add city character varying(255);
+ALTER table wfs add deliverypoint character varying(255);
+ALTER table wfs add administrativearea character varying(255);
+ALTER table wfs add postalcode character varying(255);
+ALTER table wfs add voice character varying(255);
+ALTER table wfs add facsimile character varying(255);
+ALTER table wfs add electronicmailaddress character varying(255);
+ALTER table wfs add wfs_mb_getcapabilities_doc text;
+ALTER table wfs add wfs_owner integer;
+ALTER table wfs add wfs_timestamp integer;
+ALTER table wfs add country character varying(255);
+
+ALTER TABLE wfs ALTER COLUMN wfs_title SET NOT NULL;
+ALTER TABLE wfs ALTER COLUMN wfs_title SET DEFAULT ''::character varying;
+
+ALTER TABLE wfs ALTER COLUMN wfs_version SET NOT NULL;
+ALTER TABLE wfs ALTER COLUMN wfs_version SET DEFAULT ''::character varying;
+
+ALTER TABLE wfs ALTER COLUMN wfs_getcapabilities SET NOT NULL;
+ALTER TABLE wfs ALTER COLUMN wfs_getcapabilities SET DEFAULT ''::character varying;
+
+alter table wfs_featuretype add column featuretype_searchable integer default 1;
+alter table wfs_featuretype add column featuretype_abstract character varying(50);
+
+-- grant root access to default wfs
+UPDATE wfs SET wfs_owner = 1;
+
+
+CREATE TABLE gui_wfs_conf (
+ fkey_gui_id character varying(50) DEFAULT ''::character varying NOT NULL,
+ fkey_wfs_conf_id integer DEFAULT 0 NOT NULL
+);
+ALTER TABLE ONLY gui_wfs_conf
+ ADD CONSTRAINT pk_fkey_wfs_conf_id PRIMARY KEY (fkey_gui_id, fkey_wfs_conf_id);
+
+ALTER TABLE ONLY gui_wfs_conf
+ ADD CONSTRAINT gui_wfs_conf_ibfk_1 FOREIGN KEY (fkey_gui_id) REFERENCES gui(gui_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+ALTER TABLE ONLY gui_wfs_conf
+ ADD CONSTRAINT gui_wfs_conf_ibfk_2 FOREIGN KEY (fkey_wfs_conf_id) REFERENCES wfs_conf(wfs_conf_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+-- insert wfs confs into gui digitize
+INSERT INTO gui_wfs_conf (fkey_gui_id, fkey_wfs_conf_id) VALUES ('gui_digitize', 1);
+INSERT INTO gui_wfs_conf (fkey_gui_id, fkey_wfs_conf_id) VALUES ('gui_digitize', 3);
+INSERT INTO gui_wfs_conf (fkey_gui_id, fkey_wfs_conf_id) VALUES ('gui_digitize', 4);
+INSERT INTO gui_wfs_conf (fkey_gui_id, fkey_wfs_conf_id) VALUES ('gui_digitize', 2);
+
+
+
+--
+-- new table wfs_featuretype_keyword:
+--
+CREATE TABLE wfs_featuretype_keyword (
+ fkey_featuretype_id integer NOT NULL,
+ fkey_keyword_id integer NOT NULL
+);
+
+ALTER TABLE ONLY wfs_featuretype_keyword
+ ADD CONSTRAINT fkey_keyword_id_fkey_featuretype_id FOREIGN KEY (fkey_keyword_id) REFERENCES keyword(keyword_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+ALTER TABLE ONLY wfs_featuretype_keyword
+ ADD CONSTRAINT fkey_featuretype_id_fkey_keyword_id FOREIGN KEY (fkey_featuretype_id) REFERENCES wfs_featuretype(featuretype_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+
+
+--
-- table wfs_conf_element: change in WFS configuration: access to geometries may now be restricted
--
ALTER TABLE wfs_conf_element ADD COLUMN f_auth_varname VARCHAR(50);
+
--
-- table gui_element: new column for translation
--
ALTER TABLE gui_element ADD COLUMN e_title VARCHAR(255);
+--
+-- table gui_element: new element for table admin1 to edit wfs settings
+--
+INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('admin1','WFS',2,1,'edit wfs settings','a','','href = "../javascripts/mod_wfs_client.html" target="AdminFrame"',10,1005,250,20,NULL ,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','EDIT WFS','a','','','','AdminFrame','');
+
+
--
-- new table translation: new table for translations
--
More information about the Mapbender_commits
mailing list