Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Modules are Outdated" Error

Tags:

magento-2.0

I get this error when I create a new module:

"Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:

Sangeeta_Octan data: current version - none, required version - 0.0.1";i:1;s:1781:"#0 

I searched on google and found no solution other than reinstalling Magento. Such as:

version has been changed from "2.0.0.0" to "2.0.0" during development, so update tool can't recognize that "2.0.0.0" <= "2.0.0". Please, re-install your application from scratch to get latest version. `

Do I have any options apart from reinstalling?

like image 855
Sangeeta Avatar asked Apr 18 '16 09:04

Sangeeta


3 Answers

  1. Change the setup_version of your module (Sangeeta_Octan) in app/code/Sangeeta/Octan/etc/module.xml. Try a different version name like setup_version="2.0.1" or setup_version="3.0.0"

  2. Run bin/magento setup:upgrade

  3. If that doesn't work, disable your module by changing your module name in app/etc/config.phpfrom Sangeeta_Octan => 1 to Sangeeta_Octan => 0. Then run bin/magento setup:upgrade

I hope below solution also solve your problem.

https://magento.stackexchange.com/questions/112293/mysql-error-and-possible-duplicates-running-bin-magento-setupupgrade-after-rena/112299#112299

like image 149
Bilal Usean Avatar answered Sep 21 '22 17:09

Bilal Usean


in mysql find the table setup_module It will have 3 fields. Find the NULL values in data_version & have them match the schema_version

like image 22
Jon Avatar answered Sep 22 '22 17:09

Jon


As an alternative, you can access your magento database and look at the table setup_module You will see a list of all installed modules and you can manually set the schema/data version numbers here.

like image 33
Matt Avatar answered Sep 20 '22 17:09

Matt