I'm looking to run some migration related code when my plugin is updated to the next release. I've researched and yet to find any sort of hook/trigger which will be called when a plugin has successfully upgraded.
All the suggestions I've found so far suggest to run migration on admin_init() and cross check a stored plugin version in options. But this seems like a really "hacky" solution and would imagine there must be a more structured way to run migrations (database related) when a plugin is updated from a pervious version.
What is the best way to trigger migration code for a plugin when it has been updated both manually and automatically?