[Mapbender-commits] r2648 - branches/spsneo_dev/mapbender/update

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Jul 10 09:03:22 EDT 2008


Author: spsneo
Date: 2008-07-10 09:03:21 -0400 (Thu, 10 Jul 2008)
New Revision: 2648

Added:
   branches/spsneo_dev/mapbender/update/README.txt
Log:
README file added

Added: branches/spsneo_dev/mapbender/update/README.txt
===================================================================
--- branches/spsneo_dev/mapbender/update/README.txt	                        (rev 0)
+++ branches/spsneo_dev/mapbender/update/README.txt	2008-07-10 13:03:21 UTC (rev 2648)
@@ -0,0 +1,60 @@
+--------------------------------------------------------------
+Mapbender Updater
+--------------------------------------------------------------
+
+Database update script is now ready.
+---------------------------------------------------------
+Build Process:
+---------------------------------------------------------
+>>There are three constants defined in the file update-utils.inc :
+1) MIN_PHP_VERSION : This constant defines the minimum version of PHP required on user's system.
+2) MIN_MYSQL_VERSION : As above for MySQL server
+3) MIN_PGSQL_VERSION : As above for PostgreSQL server
+
+During the process it is required to fill in the constants.
+
+>> Database is updated by SQL files. These SQL files are to be located in db folder according to following rule:
+SQL update file for mysql server and utf8 encoding should be placed in the folder db/mysql/UTF-8
+similarly SQL update file for postgresql server and utf8 encoding should be placed in db/pgsql/UTF-8 directory.
+
+In general the sql files should be placed in db/SYS_DBTYPE/CHARSET  where SYS_DBTYPE is the database type as defined in mapbender.conf and CHARSET is the file encoding as defined in mapbender.conf file.
+
+SQL update files should have extension .sql
+
+Inline comments in SQL files are not supported as of now. Example of an inline comment is:
+INSERT into <tblname> VALUES (...., ......... ) ; 			/* Inline comment */
+
+Other comments : single line comment starting with two hyphens (--) and multi line comments (/*..............*/) are allowed.
+
+Inline comments are not present in SQL dump files. 
+
+
+-----------------------------------------------------------
+Usage:
+-----------------------------------------------------------
+The update script can only be executed from command line. For security reasons execution of script from browser has been restricted.
+In a linux system the script can be executed (php-cli package should be installed) as follows:
+$ php /path/to/update.php
+
+-----------------------------------------------------------
+Features of the update script:
+-----------------------------------------------------------
+It checks whether it is being executed from browser or command line. If it is being executed form browser, execution is aborted. (Try running it from the browser)
+
+It checks the minimum required version for PHP and database server MySQL or PostgreSQL according the database type defined by user in mapbender.conf file
+
+It automatically locates the correct files for updating according to the user preferences SYS_DBTYPE and CHARSET defined in mapbender.conf file.
+It can update from any number of sql files. Say for example, there are two updates available. And these two updates are contributed by different devs in different sql files. Then there is no need to merge these two files into a single one. Just place both the sql files in the correct directory (as mentioned above) and the update script will take care of rest.
+
+
+
+
+-----------------------------------------------------------
+Constraints of the update script 
+-----------------------------------------------------------
+
+At present the script does not check the version being updated. This feature will soon be implemented. I have already prepared the framework for this, need to discuss few things with Christoph Baudson and will then implement this feature.
+
+Inline comments are not supported in sql files, as mentioned above. Butr its not a big issue as sql dumps do not have inline comments and if sql files are written by devs then it can be taken care of.
+
+



More information about the Mapbender_commits mailing list