Given the scenario:
an update to a module is deployed and immediately results in breaking the checkout
The expected reaction could be to rollback the deployment. However, with the way magento 2 handles module versioning (if a module's schema or setup version was altered during deployment and setup:upgrade was ran) this would result in an error requiring your module to match version listed in the
The only way I know how to resolve this error would be to either change the module version to match the db version after rolling back the deployment or to manually alter the module version number in the db back to its previous version after the rollback.
I am wondering
- Why the magento team decided to have magento throw an error if the module setup or schema version does not match the version in the db?
- What is the rollback strategy magento recommends given such a scenario?
...a warning in the logs would seem to be a better option to me rather than throwing a fatal error and forcing downtime.