Drupal 8 Field Type Schema column add / change / delete HOOK_update

As heavily discucced in this years old issue: [#937442] there isn't a good solution or helper in Drupal core currently to change the schema of a custom field.

Modules like

  • field_collection
  • dynamic_entity_reference (#51)
  • address
  • viewsreference
  • ...

are having the same problem and wrote their own hook_update implementations as workaround.

Until the issue is solved I wrote two first helper functions to use in a modules .install file to change the field type schema columns:

Please feel free to fork or extend my implementations.


Post new comment

The content of this field is kept private and will not be shown publicly.

More information about formatting options