[Vtigercrm-developers] Another Migration Bug...

Richard Hills - Technologywise richard at tw.co.nz
Wed Oct 21 19:14:01 GMT 2015


Haha yeah thanks Alan, we do indeed have our own migration script for 
5.4 to 6.0, have used standard since then without too many issues.

I ran a standard 5.2 to 5.4 upgrade yesterday and the result was 
passable after some small changes to the code. From there it was smooth 
sailing to 6.4 (I say this without any full testing completed).

Nice to see how you're managing to run the upgrade scripts from the 
command line, it would be great to see this become standard.

On 21/10/15 19:53, Alan Lord wrote:
> On 20/10/15 20:52, Richard Hills - Technologywise wrote:
>> Probably a stupid question, but I do still have an installation I need
>> to bring from 5.2 to 6.4... Are the recent updates to the migration
>> scripts released in any way on the site, or do I need to pull code from
>> the repo/trac tickets directly?
>>
>
> AFAICT very few of the migration bugs I have reported have been 
> incorporated into the codebase (PBXManager, Label Updater, User 
> Extensions...).
>
> So you will need to keep your own set of scripts ;-)
>
> HINT:
>
> If you stick this lot at the top of the XYZ_to_ZYX.php files (BEFORE 
> the "if (!defined('VTIGER_UPGRADE')) die('Invalid entry point');" 
> test) you can run them from the command line (mostly). There might be 
> a few missing includes but do a bit of testing and you'll get them to 
> run :-D
>
>> const VTIGER_UPGRADE = true;
>
>> $Vtiger_Utils_Log = true;
>
>>
>
>> require_once('include/logging.php');
>
>> require_once('config.php');
>
>> require_once('include/utils/CommonUtils.php');
>
>>
>
>> require_once('includes/main/WebUI.php');
>
>>
>
>> // Let's see some errors
>
>> ini_set('error_reporting', E_ALL & ~E_NOTICE & ~E_DEPRECATED & 
>> ~E_STRICT);
>
>> ini_set('display_startup_errors', 1);
>
>> ini_set('display_errors', 1);
>
> I have a custom vtiger tarball which starts with a clean 5.4.0 
> installed system, then I extract the various update packages (5.4.0 to 
> 6.0.0.zip) over the top until I'm at the latest release. then I copy 
> in my customised schema files. Then I tarball that lot up.
>
> Once you configure the config.ini for the db you want to migrate you 
> can run these scripts from the root of this vtiger system
>
> # sudo -u www-data php -f modules/Migration/schema/XYZ_to_ZYX.php
>
> You will have to search this list for my various posts over the years 
> which point out the many errors in the migration scripts and suggested 
> fixes.
>
> Hope that helps everyone who struggles with the web-based migration 
> process; in our experience, for a database of any significant size 
> they _will_ fail. At least when you run them from the cli they will 
> not time out and you can see where it failed ;-)
>
>
> Al
>
>
> _______________________________________________
> http://www.vtiger.com/

-- 
Richard Hills
TechnologyWise Ltd, Tauranga, NZ
richard at tw.co.nz
www.technologywise.co.nz
ph: +64 (0)7 571 1060
fax: +64 (0)7 571 1061



More information about the vtigercrm-developers mailing list