I'm currently porting my contributed module to Drupal 8, and sometimes I realize I've chosen the wrong field type. I also know that I will need to add additional fields later on, and it would be nice to avoid having to uninstall and reinstall the module every time I do this.
I looked at Add field to existing content entity, but it did not seem to be the actual question.
My question is basically: what's the equivalent of similar D7 update.php
code with D8 and entities?
<?php
function MYMODULE_update_7101() {
db_add_field('mymodule_table', 'some_new_field', $field_schema);
}
?>