What is the purpose of drush entity-updates? After updating Drupal 8 modules, I have been warned on the Drupal 8 status page that:


  Entity/field definitions: The following changes were detected in the
  entity type and field definitions.


After a bit of Google rummaging, it seems the solution to this is to run drush entity-updates. However I find this a bit strange as it seems to be another command that one needs to remember or incorporate into one's workflow after updating the database, not to mention it didn't seem immediately obvious about how to address the original warning.

What's more, it's often the case that in development you'll have an alert for other actions in the Status page which will mean you won't immediately know if you need to action this.

Can anybody explain what is this warning is for - or rather, why has this feature been introduced into D8, and why isn't it factored into the database update operation but must be run seperately?
drush entity-updates is a developer tool. If you change entity/field definitions in your custom module you can quickly apply this.

In production this should not happen. If you update a module between official releases, then the update code in the module should handle this.

But in your case you are mentioning that your site is in developing. So there are a lot of things, which could have caused this. Either in your own code or in dev or alpha versions of contrib modules.

I found this example from the CR Write update functions for entity schema updates, automation removed (where there are further examples):

/**
 * Add 'revision_translation_affected' field to 'node' entities.
 */
function node_update_8001() {
  // Install the definition that this field had in
  // \Drupal\node\Entity\Node::baseFieldDefinitions()
  // at the time that this update function was written. If/when code is
  // deployed that changes that definition, the corresponding module must
  // implement an update function that invokes
  // \Drupal::entityDefinitionUpdateManager()-&gt;updateFieldStorageDefinition()
  // with the new definition.
  $storage_definition = BaseFieldDefinition::create('boolean')
      -&gt;setLabel(t('Revision translation affected'))
      -&gt;setDescription(t('Indicates if the last edit of a translation belongs to current revision.'))
      -&gt;setReadOnly(TRUE)
      -&gt;setRevisionable(TRUE)
      -&gt;setTranslatable(TRUE);

  \Drupal::entityDefinitionUpdateManager()
    -&gt;installFieldStorageDefinition('revision_translation_affected', 'node', 'node', $storage_definition);
}