Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.2
-
Fix Version/s: 3.2
-
Component/s: Core CiviCRM
-
Labels:None
Description
Instead of polluting CRM_Upgrade_Page_Upgrade.php with all upgrade_$rev() methods, we should follow a protocol/name-space for php files as well (similar to sql.tpl files). Upgrade engine should be improved to ensure this.
Note the changes / improvements should only apply for versions >= 3.2.alpha1.
php files should be looked for as CRM/Upgrade/Incremental/php/{$versionInWordFormat}.php
php methods will accessed in the format like :
CRM/Upgrade/Incremental/php/ThreeTwo::upgrade_3_2_alpha1 ( )
CRM/Upgrade/Incremental/php/ThreeTwo::upgrade_3_2_beta1 ( )
CRM/Upgrade/Incremental/php/ThreeTwo::upgrade_3_2_0 ( )
... and so on.
Note if we 'll continue with existing rule of giving preference to php methods only if they exist.
For every major release (for alpha rev), upgrade should automatically call increamentalPHPFile::verifyPreDBstate().