function drush_core_updatedb

8.0.x drush_core_updatedb()
6.x drush_core_updatedb()
7.x drush_core_updatedb()
3.x drush_core_updatedb()
4.x drush_core_updatedb()
5.x drush_core_updatedb()
master drush_core_updatedb()

Command handler. Execute update.php code from drush.


commands/core/, line 275
Core drush commands.


function drush_core_updatedb() {
  if (drush_get_context('DRUSH_SIMULATE')) {
    drush_log(dt('updatedb command does not support --simulate option.'), 'ok');
    return TRUE;

  drush_include_engine('drupal', 'update', drush_drupal_major_version());
  if (update_main() === FALSE) {
    return FALSE;

  if (drush_drupal_major_version() <= 6) {
    // Clear all caches. We just performed major surgery.
  else {
    // Should be unnecessary on D7.
    // On D7 site-upgrade, this cache_clear was leading to:
    // Call to undefined function field_read_fields() in field_sql_storage.install line 17

  drush_log(dt('Finished performing updates.'), 'ok');