0

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 – Prathap Gunasekaran Mar 18 '19 at 9:31
  • DELETE from setup_module where module = 'Company_Setup'; – Prathap Gunasekaran Mar 18 '19 at 9:32
0

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

|improve this answer|||||
  • I need command instead of going manual in the database to delete setup_module. – Yogendra - eCommerce Developer Mar 18 '19 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 – Vivek Kumar Mar 18 '19 at 9:35
0

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
|improve this answer|||||
0

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 
'%Company_Setup%'
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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