Magento_Integration schema: current version - 2.2.0, required version - 2.0.1
-
11-10-2020 - |
Question
Using 2.1.5, I'm getting an error message saying:
"Magento_Integration schema: current version - 2.2.0, required version - 2.0.1"
I've tried setup:update
and setup:db-data:upgrade
.
The site was installed via cPanel/installation version 2.0.7 and has been upgraded several times.
The only thing that brings the site back online is if I edit the Magento_Integration entry of the setup_module table which I would think is not a good idea.
Solution
Have a look at setup_module
table into the database.
You should see something similar to this:
In order to fix it, set the values manually to 2.0.1 for both schema
and data
and then try to upgrade again with the following:
bin/magento setup:upgrade
Then flush cache:
bin/magento cache:flush
It looks like for some reason the upgrade did not work or did not finish but Magento update setup_module
table.
By setting those values manually and running the upgrade afterwards you are forcing the upgrade one more time.
You can actually see what this particular upgrade does in:
// \Magento\Integration\Setup\UpgradeData::upgrade()
public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
$setup->startSetup();
if (version_compare($context->getVersion(), '2.2.0', '<')) {
$this->removeRevokedTokens($setup);
$this->removeTokensFromInactiveAdmins($setup);
$this->removeTokensFromInactiveCustomers($setup);
}
$setup->endSetup();
}
As you can see, all it does it to remove revoked and inactive tokens.