Created
March 1, 2017 17:41
-
-
Save mikeyp/7670eb9a932dd1bdf22a93c2b0984754 to your computer and use it in GitHub Desktop.
Update a Drupal 8 entity definition without uninstall/reinstalling the module.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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