-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
M2 suggests running setup:upgrade if version number of module is higher than expected #9981
Comments
What if the architecture of the tables/data change and you revert back to an older version (of magento/of module) - you wouldn't be warned until a schema failure/logical data failure occurs? It would be nice if magento allowed you to roll back changes in such a case! |
@southerncomputer Yes - this is the only reason I could imagine as mentioned above. In my case this isn't an issue, but I could see that this might be the reason for larger/public modules. If there was an encouragement to use SemVer, would it be unreasonable to expect M2 to check the major version and potentially inforce this logic, but ignore it on minor/patch versions? |
Current behavior clearly needs to be changed (at the very least, the exception message has to be less confusing). |
Internal ticket to track issue progress: MAGETWO-80225 |
Hi @chickenland the issue has been fixed in #11064 by @schmengler . The fix will be available in 2.2.1 |
Hi @chickenland. Thank you for your report.
The fix will be available with the upcoming 2.3.0 release. |
This appears to be an issue that is highlighted whilst using different versions of a module within source control, where there is a different version of a module in another branch.
When you update a module, and then switch branches to a branch with a lower version number, Magento throws an exception prompting the user to run bin/magento setup:upgrade.
\Magento\Framework\Module\DbVersionInfo::isModuleVersionEqual
appears to check for equality to current version number.Running
setup:upgrade
in this instance appears to do nothing.I can't think of a reason why this has been done this way (I guess future versions of a module could update the database and then become incompatible with an earlier version?) - perhaps it's just the exception message that needs to change?
Preconditions
Steps to reproduce
bin/magento setup:upgrade
Expected result
Actual result
The text was updated successfully, but these errors were encountered: