Necessary migration steps on a per update basis
When updating from version, say 3.0.0, to version 4.0.0, go through a map of necessary migrations.
Should be its own class, which is provided the current version and the previous version. Based on these two parameters, it should then determine the diff of updates and execute available migrations.
The benefit of such a system:
- Ensuring a given user always has any and all necessary migrations executed, resulting in an up-to-date environment and system.
- Centralized migration steps management. No longer have any migration safeguards and ensurements (is that a word, well ti is now) spread out across multiple classes.
- Future proof updates, even when a user updates between major releases