function drush_pm_updatecode_postupdate

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

Command callback. Execute updatecode-postupdate.

File

commands/pm/pm.drush.inc, line 1391
The drush Project Manager

Code

function drush_pm_updatecode_postupdate() {
  // Clear the cache, since some projects could have moved around.
  drush_drupal_cache_clear_all();

  // Notify of pending database updates.
  // Make sure the installation API is available
  require_once DRUSH_DRUPAL_CORE . '/includes/install.inc';

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

  // @see system_requirements().
  foreach (drush_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. Run `drush updatedb` or visit update.php in your browser."), LogLevel::WARNING);
        break;
      }
    }
  }
}