Skip to content

Instantly share code, notes, and snippets.

@mikeyp
Created March 1, 2017 17:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeyp/7670eb9a932dd1bdf22a93c2b0984754 to your computer and use it in GitHub Desktop.
Save mikeyp/7670eb9a932dd1bdf22a93c2b0984754 to your computer and use it in GitHub Desktop.
Update a Drupal 8 entity definition without uninstall/reinstalling the module.
<?php
/**
* @file
* Install, update and uninstall functions for mymodule.
*/
/**
* Update the schema for my entity.
*/
function mymodule_update_8001() {
\Drupal::service('entity.definition_update_manager')->applyUpdates();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment