[Vtigercrm-developers] Another migration script query...

Alan Lord alanslists at gmail.com
Fri Mar 4 10:47:53 GMT 2016


This is totally bonkers...

When you install a clean version of vtiger, say version 6.4.0, what I 
discovered recently is that the installation process runs all the 
migration scripts as well!

See: http://code.vtiger.com/vtiger/vtigercrm/issues/86

Recall that in 540_to_600RC.php there is the bit of code I mentioned 
before which is losing *critical* information when it migrates old 
comments from the vtiger_ticketcomments to the standard 
vtiger_modcomments table...

Very shortly *after* the above piece of code is a bit which adds the 
"customer" field (that holds the Contact ID) into the ModComments module!

In the ModComments Module zipped package file it creates the 
vtiger_modcomments table with the following SQL


> CREATE TABLE `vtiger_modcomments` (
> `modcommentsid` int(11) DEFAULT NULL,
> `commentcontent` text,
> `related_to` varchar(100) NOT NULL,
> `parent_comments` varchar(100) default NULL
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8

There are three further columns which are being added to this table via 
the migration script (but only after the data has been copied from 
tickets and faq records)!

'customer', 'userid', 'reasontoedit'

Over the years I have pointed out that there are several very major, and 
loads of minor, errors in these migration scripts and from what I can 
tell none of them have been incorporated as yet (please see the archive 
of this list for more information).

What has really surprised me recently is that these scripts are being 
run during a fresh, clean installation too!

Why?

Why hasn't, for example, the ModComments module package been updated so 
that when we install 6.4.0 it creates all the necessary columns?

It means that none of the standard vtiger modules which are installed on 
a new system have a particular *version*. Because, in this case, 
ModComments is updated from the 540_to_600RC.php script after it is 
installed.

This seems completely bonkers to me...

Al




More information about the vtigercrm-developers mailing list