[Vtigercrm-developers] Performance and Installation Process
Manuel Fernando
ptdesigner at gmail.com
Fri Oct 14 21:13:46 GMT 2016
Alan,
I just found something wired again in the migration files,
if(defined(‘VTIGER_UPGRADE’)) doesn’t work only in upgrade (migration as i understand)
so, look at logs and you will see that in installation mode, 620_to_630.php tries to insert this already present in database
===============================
if(defined(‘VTIGER_UPGRADE')) {
global $adb;
$query = 'SELECT DISTINCT profileid FROM vtiger_profile2utility';
$result = $adb->pquery($query, array());
$profileId = $adb->query_result($result,0,'profileid');
Migration_Index_View::ExecuteQuery('INSERT INTO vtiger_profile2utility(profileid,tabid,activityid,permission) VALUES ('.$profileId.',40,5,0)',array());
Migration_Index_View::ExecuteQuery('INSERT INTO vtiger_profile2utility(profileid,tabid,activityid,permission) VALUES ('.$profileId.',40,6,0)',array());
Migration_Index_View::ExecuteQuery('INSERT INTO vtiger_profile2utility(profileid,tabid,activityid,permission) VALUES ('.$profileId.',40,10,0)',array());
Migration_Index_View::ExecuteQuery('INSERT INTO vtiger_profile2utility(profileid,tabid,activityid,permission) VALUES ('.$profileId.',19,5,0)',array());
Migration_Index_View::ExecuteQuery('INSERT INTO vtiger_profile2utility(profileid,tabid,activityid,permission) VALUES ('.$profileId.',19,6,0)',array());
Migration_Index_View::ExecuteQuery('INSERT INTO vtiger_profile2utility(profileid,tabid,activityid,permission) VALUES ('.$profileId.',19,10,0)',array());
for($i=1; $i< $adb->num_rows($result); $i++){
$profileId = $adb->query_result($result,$i,'profileid');
Migration_Index_View::ExecuteQuery('INSERT INTO vtiger_profile2utility(profileid,tabid,activityid,permission) VALUES ('.$profileId.',40,5,1)',array());
Migration_Index_View::ExecuteQuery('INSERT INTO vtiger_profile2utility(profileid,tabid,activityid,permission) VALUES ('.$profileId.',40,6,1)',array());
Migration_Index_View::ExecuteQuery('INSERT INTO vtiger_profile2utility(profileid,tabid,activityid,permission) VALUES ('.$profileId.',40,10,0)',array());
Migration_Index_View::ExecuteQuery('INSERT INTO vtiger_profile2utility(profileid,tabid,activityid,permission) VALUES ('.$profileId.',19,5,1)',array());
Migration_Index_View::ExecuteQuery('INSERT INTO vtiger_profile2utility(profileid,tabid,activityid,permission) VALUES ('.$profileId.',19,6,1)',array());
Migration_Index_View::ExecuteQuery('INSERT INTO vtiger_profile2utility(profileid,tabid,activityid,permission) VALUES ('.$profileId.',19,10,0)',array());
}
}
=============================
Same in 600_to_610.php
cannot insert this because
Duplicate entry 'cron/modules/Reports/ScheduleReports.service’
Best regards.
Manuel
> No dia 05/10/2016, às 18:34, Alan Lord <alanslists at gmail.com> escreveu:
>
> On 05/10/16 18:11, Manuel Fernando wrote:
>> Hello again,
>>
>> Don’t you guys agree that when each update (migration) is released,
>> installation is getting massive?
>>
>> I see now in different systems since 6.4 6.5 and 6.6(not released yet)
>> installation takes a lot to finish. This is because installation uses
>> the migration files (540_to_600RC.php, 600_to_610.php, etc)
>>
>> Is a good idea or not combine an pre ready .sql to populate database in
>> installation?
>
> There does need to be a different approach I completely agree.
>
> These migration scripts are full of bugs and errors. I was very surprised when I discovered that a clean installation runs through these too.
>
> I have spent a lot of time fixing most of the issues and speeding up the migration scripts where possible and I now run them from the command line only. They take so long to run (the ones from 5.4.0 to 6.0.0 and 6.0.0 to 6.1.0 are the main problems) on a large database that doing it via the web interface would never work.
>
> Al
>
>
> _______________________________________________
> http://www.vtiger.com/
More information about the vtigercrm-developers
mailing list