On a Magento 2 branch, when I am running the composer will get different module versions than the required one. Let's say for the
Magento_Store module I do need the 2.0.0 version, but the composer is installing the 2.1.0 version.
So after a succesful install when I am trying to access the website, I am getting error messages for both
data_version for lot's of modules.
Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory. The following modules are outdated: Magento_Store schema: current version - 2.1.0, required version - 2.0.0 Magento_Store data: current version - 2.1.0, required version - 2.0.0 Magento_Directory schema: current version - 2.0.1, required version - 2.0.0 Magento_Directory data: current version - 2.0.1, required version - 2.0.0
And the list is very long! Only part of it has been copied above.
Until now, I was trying to modify the version number in the
setup_module table from database, but no luck. Before that, I was running the
bin/magento setup:upgrade command and also cleared the cache but I had the feeling I'm in a loop and always got back to the same error list. So, I guess my aproach was wrong.
Is there a solution to set up the right way the composer in order to avoid in future such problems? Or what should be the direction to aproach?