[Mapbender-commits] r9463 - trunk/mapbender/resources/db/pgsql/UTF-8/update
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu May 19 00:32:48 PDT 2016
Author: armin11
Date: 2016-05-19 00:32:47 -0700 (Thu, 19 May 2016)
New Revision: 9463
Modified:
trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql
Log:
New table to log invocation of clients from external sites
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-05-18 14:32:51 UTC (rev 9462)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql 2016-05-19 07:32:47 UTC (rev 9463)
@@ -1006,3 +1006,46 @@
ALTER TABLE metadata_load_count
OWNER TO postgres;
+--new table to log invocation of mapbender clients by referrer
+
+-- Table: external_api_log
+
+-- DROP TABLE external_api_log;
+
+CREATE TABLE external_api_log
+(
+ log_id serial NOT NULL,
+ createdate timestamp without time zone,
+ lastchanged timestamp without time zone NOT NULL DEFAULT now(),
+ referrer text,
+ api_type integer,
+ fkey_wmc_serial_id integer,
+ log_count bigint,
+ CONSTRAINT wmc_keyword_fkey_wmc_serial_id_fkey FOREIGN KEY (fkey_wmc_serial_id)
+ REFERENCES mb_user_wmc (wmc_serial_id) MATCH SIMPLE
+ ON UPDATE CASCADE ON DELETE CASCADE
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE external_api_log
+ OWNER TO postgres;
+
+-- Index: idx_external_api_log_referrer
+
+-- DROP INDEX idx_external_api_log_referrer;
+
+CREATE INDEX idx_external_api_log_referrer
+ ON external_api_log
+ USING btree
+ (referrer COLLATE pg_catalog."default" );
+
+-- Trigger: update_external_api_log_lastchanged on external_api_log
+
+-- DROP TRIGGER update_external_api_log_lastchanged ON external_api_log;
+
+CREATE TRIGGER update_external_api_log_lastchanged
+ BEFORE UPDATE
+ ON external_api_log
+ FOR EACH ROW
+ EXECUTE PROCEDURE update_lastchanged_column();
More information about the Mapbender_commits
mailing list