function drush_pm_post_pm_updatecode

8.0.x pm.drush.inc drush_pm_post_pm_updatecode()
6.x pm.drush.inc drush_pm_post_pm_updatecode()
7.x pm.drush.inc drush_pm_post_pm_updatecode()
3.x pm.drush.inc drush_pm_post_pm_updatecode()
4.x pm.drush.inc drush_pm_post_pm_updatecode()
5.x pm.drush.inc drush_pm_post_pm_updatecode()
master pm.drush.inc drush_pm_post_pm_updatecode()

Post-command callback for updatecode. Notify about any pending DB updates.

File

commands/pm/pm.drush.inc, line 936
The drush Package Manager

Code

function drush_pm_post_pm_updatecode() {
  // Make sure the installation API is available
  require_once drush_get_context('DRUSH_DRUPAL_ROOT') . '/includes/install.inc';

  // Load all .install files.
  drupal_load_updates();

  // @see system_requirements().
  foreach (module_list() as $module) {
    $updates = drupal_get_schema_versions($module);
    if ($updates !== FALSE) {
      $default = drupal_get_installed_schema_version($module);
      if (max($updates) > $default) {
        drush_log(dt("You have pending database updates. Please run `drush updatedb` or visit update.php in your browser."), 'warning');
        break;
      }
    }
  }
}