7

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?

4444
  • 3,541
  • 10
  • 32
  • 43
Sangeeta
  • 83
  • 1
  • 1
  • 3

5 Answers5

7
  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

Community
  • 1
  • 1
Bilal Usean
  • 2,322
  • 3
  • 22
  • 45
7

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

Jon
  • 6,437
  • 8
  • 43
  • 63
6

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.

Matt
  • 428
  • 3
  • 15
0

Delete the offending rows from the setup_module table (if they are there) and run the command bin/magento setup:upgrade from your Magento 2 root directory.

nick.graziano
  • 677
  • 6
  • 12
0

This is happens because of something wrong while running "bin/magento setup:upgrade" and the data_version in Module versions registry is null. It is loaded from DB, We can just proceed by manually changing it in db.

Go db via php myadmin and check "setup_module" table, the data_version which are mentioned "null".

Login to Mysql database => then update table setup_module of the "data_version" column same as "schema_version"
nisamudeen97
  • 519
  • 4
  • 22