Skip to content

Commit 41ab1fb

Browse files
committed
CRM-16972 - don't throw error if no db upgrade is needed
1 parent 0c0f26e commit 41ab1fb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drush/civicrm.drush.inc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,12 @@ function drush_civicrm_upgrade_db_validate() {
684684
function drush_civicrm_upgrade_db() {
685685
if (class_exists('CRM_Upgrade_Headless')) {
686686
// Note: CRM_Upgrade_Headless introduced in 4.2 -- at the same time as class auto-loading
687+
$codeVer = CRM_Utils_System::version();
688+
$dbVer = CRM_Core_BAO_Domain::version();
689+
if (version_compare($codeVer, $dbVer) == 0) {
690+
drush_print(dt("You are already upgraded to CiviCRM @version", array('@version' => $codeVer)));
691+
return TRUE;
692+
}
687693
$upgradeHeadless = new CRM_Upgrade_Headless();
688694
// FIXME Exception handling?
689695
$result = $upgradeHeadless->run();

0 commit comments

Comments
 (0)