Suppose I have Magento extension Company_Setup and version v1.0.0.

I update the version with some DB change v1.0.11 I have installed the extension and now in DB version update with 1.0.11.

But suddenly I need to revert the changes where extension version is v1.0.0 then it shows the mismatch version issue after running all Magento commands.

Is there any command to deploy the previous database version when reverting the module changes?

  • Try delete your module from setup_module then change version downgrade or up no issue occur while setup:upgrade Mar 18, 2019 at 9:31
  • DELETE from setup_module where module = 'Company_Setup'; Mar 18, 2019 at 9:32

3 Answers 3


You could use command from https://github.com/netz98/n98-magerun2 like bin/magento

It supported downgrade database

php n98-magerun2.phar sys:setup:downgrade-versions

You can search for your module Company_Setup and update version directly in setup_module table

  • I need command instead of going manual in the database to delete setup_module. Mar 18, 2019 at 9:33
  • There is no command to downgrade setup, the setup upgrade updates module version only when it is higher than the current value in setup_module Mar 18, 2019 at 9:35

you can do directly in db or inside your module.xml update setup version setup_version="1.0.12"

update setup_module set data_version= "1.0.0" where module like 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.