Automated instant rollback is an important feature of enterprise-grade deployment mechanisms. Currently, it’s not possible to achieve this using Magento’s built-in installation tools.
Given that Magento’s
core_resource mechanism allows for the sequential execution of setup scripts for installation or upgrade of modules (via execution of SQL and also PHP), it seems logical IMHO that it should support the same process in reverse.
Now, some obvious reasons not to support it:
It would be challenging for the rollback scripts to be independent (and possibly idempotent?). I don’t see this to be a valid reason to avoid the feature, it’s an excuse at best.
Other modules might have dependencies on the installed module. The module’s xml declaration
<depends/>node could be used to flag these linkages.
A developer might want to temporarily disable a module without doing a full uninstall. This could require a new status in the xml declaration
Interested in your thoughts.