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:
https://gist.github.com/JPustkuchen/ce53d40303a51ca5f17ce7f48c363b9b
Please feel free to fork or extend my implementations.