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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Aug 15 16:22:06 EDT 2008


Author: spsneo
Date: 2008-08-15 16:22:06 -0400 (Fri, 15 Aug 2008)
New Revision: 2835

Added:
   branches/spsneo_dev/mapbender/update/Build.txt
Log:
Documentation updated

Added: branches/spsneo_dev/mapbender/update/Build.txt
===================================================================
--- branches/spsneo_dev/mapbender/update/Build.txt	                        (rev 0)
+++ branches/spsneo_dev/mapbender/update/Build.txt	2008-08-15 20:22:06 UTC (rev 2835)
@@ -0,0 +1,58 @@
+--------------------------------------------------------------
+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 build process it is required to fill in the constants.
+
+>>The file update.php has some arrays which may have to be changed sometime.
+$dir_not_to_scan contains those directories which are not to be scanned for verifying the checksum. Example : conf directory is not verified as it contains the configurations so it must have changed, similarly log directory is not verified as it contains the log files, etc. This array should be same as defined in build-checksum.php
+
+$dir_not_to_copy contains those directories which are not to be replaced. Example: conf, log, license etc.
+
+
+
+>> Database is updated by SQL files. The SQL files are in mapbender/resources/db/SYS_DBTYPE/CHARSET/update/ 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. 
+
+
+-----------------------------------------------------------
+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 verifies whether the installation has been customized or not. If it has been customized, the script aborts otherwise the script automatically replaces the old files with new ones.
+
+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