[Vtigercrm-developers] Another Migration Bug...

Alan Lord alanslists at gmail.com
Wed Oct 21 06:53:35 GMT 2015


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




More information about the vtigercrm-developers mailing list