[Vtigercrm-developers] [PATCH] 5.0GA Migration Script Breakage

Dennis Grant dgrant at accuratetechnologies.com
Thu Sep 28 09:28:46 PDT 2006


 OK, I got the migration script working, and it appears to have done the
right things everywhere. Everything I checked was properly imported.

That analysis may change once the users get a look at it. :) But for
now, it worked.

Attached is the patch for how I did it. It's not pretty, and it isn't
suitable for inclusion in the general release. I've included it so
Minnie can see what I did to fix the problem, and then do it correctly.
;)

The core issue was not being able to find the mysql binary utilities,
and the migration script not handling this case very well. I solved the
problem by hardcoding the paths to the mysql binaries and the working
directory for the database dumps to match my installation.

Once that was resolved, the migration proceeded normally, save this:

alter table vtiger_vendor change column name vendorname varchar(100)
default NULL
ALTER TABLE `vtiger_reportsortcol` DROP INDEX `reportsortcol_IDX0`
ALTER TABLE `vtiger_potstagehistory` DROP INDEX PotStageHistory_IDX1
ALTER TABLE `vtiger_potstagehistory` ADD INDEX `PotStageHistory_IDX1`
(`historyid`)
update vtiger_cvcolumnlist set columnindex = 1 where cvid=20 and
columnindex=3

That stuff all failed, although I can't see any subsequent problems with
that.

Note that as a general point, when one does this:

$some_command_string = 'some series of commands and switches;
exec($some_command_string);

Doing this as part of the logging:

$log->debug('We executed the following command string: some series of
commands and switches');

Is NOT very useful, as it doesn't actually report the commands being
exec-ed.

The proper way to do it is:

$log->debug("We executed the following command string:
$some_command_string");

As this reports the same command string that was passed to the exec.

DG
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: DG_migrationpatch.txt
Url: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20060928/9b77e17f/attachment-0003.txt 


More information about the vtigercrm-developers mailing list