As per ticket #2720 as of changeset:9948 database modifications for both SVN and point release users are greatly simplified. This does however require some extra effort on the part of developers.
Procedure for making database modifications
- Make the changes to the installation process
- this is done the same as always
- files you'll likely be modifying are schema/DatabaseSchema.xml and modules/Users/Security.php
- Create a database update file
- create the php file updates/vtiger/<SVN revision>.php
- this file should execute all the changes required on an existing database
- use adodb to make the changes database independent
- see http://phplens.com/lens/adodb/docs-datadict.htm for the table creation and alteration syntax
- see include/database/PearDatabase.php for the wrapper functions to the adodb interface you should use through the $adb object
- Update the code revision number
- modify $svn_revisionvtiger? in vtigerversion.php to match <SVN revision>
The <SVN revision> used above should be the SVN revision to be created by your commit of this code. If the tree is busy that could be difficult to predict, in which case the last 2 steps should be completed in a 2nd SVN commit.
Localised modification
The database update process allows multiple upgrade paths. This allows you to use the upgrade system for localised modifications as well. Simply follow the above procedure using updates/<project>/<version>.php and $svn_revision[<project>] instead and the two upgrade paths will be maintained separately.
