function drush_update_entity_definitions

8.0.x update.inc drush_update_entity_definitions(&$context)
master update.inc drush_update_entity_definitions(&$context)

Apply entity schema updates.

2 string references to 'drush_update_entity_definitions'
drush_update_batch in commands/core/drupal/update.inc
Start the database update batch process.
entity_updates_main in commands/core/drupal/update.inc
Apply pending entity schema updates.

File

commands/core/drupal/update.inc, line 246
Update.php for provisioned sites. This file is a derivative of the standard drupal update.php, which has been modified to allow being run from the command line.

Code

function drush_update_entity_definitions(&$context) {
  try {
    \Drupal::entityDefinitionUpdateManager()->applyUpdates();
  }
  catch (EntityStorageException $e) {
    watchdog_exception('update', $e);
    $variables = Error::decodeException($e);
    unset($variables['backtrace']);
    // The exception message is run through
    // \Drupal\Component\Utility\SafeMarkup::checkPlain() by
    // \Drupal\Core\Utility\Error::decodeException().
    $ret['#abort'] = array(
      'success' => FALSE,
      'query' => t('%type: !message in %function (line %line of %file).', $variables),
    );
    $context['results']['core']['update_entity_definitions'] = $ret;
    $context['results']['#abort'][] = 'update_entity_definitions';
  }
}