Change record status: 
Project: 
Introduced in branch: 
8.0.x
Description: 

This is not true any more! See https://www.drupal.org/node/2554097.

Drupal 8 has the capability for the entity storage to automatically generate the SQL schema for any entity type. We can handle the addition/removal/update of field storage definitions automatically without hook_update_N() implementations. The automatic updates are run by update.php after all of the outstanding hook_update_N() implementations.

Sometimes it is necessary to ensure that a specific entity or field update has occurred during a hook_update_N() implementation. To do this the implementation can call \Drupal::service('entity.definition_update_manager')->applyFieldUpdate() or \Drupal::service('entity.definition_update_manager')->applyEntityUpdate().

For example

function mymodule_update_8002() {
  // Create the new mymodule_field.
  if (\Drupal::service('entity.definition_update_manager')->applyFieldUpdate(EntityDefinitionUpdateManagerInterface::DEFINITION_CREATED, 'node', 'mymodule_field')) {
    // Do relevant updates.
  }
  // Apply all node entity type updates.
  if (\Drupal::service('entity.definition_update_manager')->applyEntityUpdate(EntityDefinitionUpdateManagerInterface::DEFINITION_UPDATED, 'node')) {
    // Do relevant updates.
  }
}
Impacts: 
Module developers