is there a reason why Magento shouldn't support uninstall/downgrade for modules

前端 未结 3 1557
被撕碎了的回忆
被撕碎了的回忆 2021-01-03 15:48

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 instal

3条回答
  •  别那么骄傲
    2021-01-03 16:31

    1. I'm reminded of my own question where Ivan Chepurnyi said to you:

      @Jonathan hope Magento 2.0 will be more developer friendly, especially in a way of database upgrades. But of course it just will be extended Zend_Db. Using of Doctrine 2.0 orm would solve the this issue, but it requires to rewrite Magento from scratch :)

      I don't know Doctrine but from reading of it's mapping the schema is described in PHPDoc comments for classes (presumably garnered by reflection) which are then converted into queries transparently. There is no need for setup scripts. This must mean a rollback is the same as a downgrade, install the previous version classes and their comments and the rest just happens.

      Knowing Magento they probably wouldn't go back and upset old code but instead offer an alternative setup method using incremental XML files - albeit with no namespace. Rolling back a version here would mean inverting the difference as described in each file.
      I would prefer this way too as it means instructions like inserting default records would be possible, something I don't think Doctrine manages. And it coexists with versions previous to the change. Are you going to make a feature request?

    2. Version numbers in seems logical.

    3. I don't really have a third point but I wanted to complete the set. :D

    Edit:
    I forgot to answer the question. No, there isn't a reason why Magento shouldn't support downgrades, at least not if they were willing to put the effort in.

提交回复
热议问题