Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Database not upgrading automatically
 
wabism
Jr. Member
 
Total Posts:  20
Joined:  2011-11-01
New York
 

Hi, I recently upgraded Magento v1.5 to v1.6.

Here’s what I did:

I created a development environment (mirrored live site). I ran the upgrade on the development environment, and upgraded everything that I needed to get it working perfectly. Once I had it complete, I moved all the DEVELOPMENT files over to the live server, however I don’t think that after I transferred the development files to the live site it didn’t upgrade the database with it. The site works but there a bunch of little errors i’m getting here and there that I started correcting one by one but they are never ending.

I went to run a DB repair tool on the LIVE (broken) site and the DEVELOPMENT (site) and this is what it is saying:

Module "api2_setup" is not installed in corrupted DB
    Module 
"api_setup" has wrong version 0.8.1 in corrupted DB (reference DB contains "api_setup" ver1.6.0.0)
    
Module "backup_setup" has wrong version 0.7.0 in corrupted DB (reference DB contains "backup_setup" ver1.6.0.0)
    
Module "bundle_setup" has wrong version 0.1.14 in corrupted DB (reference DB contains "bundle_setup" ver1.6.0.0.1)
    
Module "captcha_setup" is not installed in corrupted DB
    Module 
"catalogindex_setup" has wrong version 0.7.10 in corrupted DB (reference DB contains "catalogindex_setup" ver1.6.0.0)
    
Module "cataloginventory_setup" has wrong version 0.7.8 in corrupted DB (reference DB contains "cataloginventory_setup" ver1.6.0.0.2)
    
Module "catalogrule_setup" has wrong version 0.7.10 in corrupted DB (reference DB contains "catalogrule_setup" ver1.6.0.3)
    
Module "catalogsearch_setup" has wrong version 0.7.7 in corrupted DB (reference DB contains "catalogsearch_setup" ver1.6.0.0)
    
Module "catalog_setup" has wrong version 1.4.0.0.44 in corrupted DB (reference DB contains "catalog_setup" ver1.6.0.0.14)
    
Module "checkout_setup" has wrong version 0.9.5 in corrupted DB (reference DB contains "checkout_setup" ver1.6.0.0)
    
Module "compiler_setup" has wrong version 0.1.0 in corrupted DB (reference DB contains "compiler_setup" ver1.6.0.0)
    
Module "contacts_setup" has wrong version 0.8.0 in corrupted DB (reference DB contains "contacts_setup" ver1.6.0.0)
    
Module "customer_setup" has wrong version 1.4.0.0.14 in corrupted DB (reference DB contains "customer_setup" ver1.6.2.0.1)
    
Module "downloadable_setup" has wrong version 1.4.0.3 in corrupted DB (reference DB contains "downloadable_setup" ver1.6.0.0.2)
    
Module "giftmessage_setup" has wrong version 0.7.6 in corrupted DB (reference DB contains "giftmessage_setup" ver1.6.0.0)
    
Module "googlecheckout_setup" has wrong version 0.7.4 in corrupted DB (reference DB contains "googlecheckout_setup" ver1.6.0.1)
    
Module "importexport_setup" has wrong version 0.1.0 in corrupted DB (reference DB contains "importexport_setup" ver1.6.0.2)
    
Module "log_setup" has wrong version 0.7.7 in corrupted DB (reference DB contains "log_setup" ver1.6.0.0)
    
Module "moneybookers_setup" has wrong version 1.2.0.1 in corrupted DB (reference DB contains "moneybookers_setup" ver1.6.0.0)
    
Module "newsletter_setup" has wrong version 0.8.3 in corrupted DB (reference DB contains "newsletter_setup" ver1.6.0.1)
    
Module "oauth_setup" is not installed in corrupted DB
    Module 
"paygate_setup" has wrong version 0.7.1 in corrupted DB (reference DB contains "paygate_setup" ver1.6.0.0)
    
Module "payment_setup" has wrong version 0.7.0 in corrupted DB (reference DB contains "payment_setup" ver1.6.0.0)
    
Module "paypaluk_setup" has wrong version 0.7.0 in corrupted DB (reference DB contains "paypaluk_setup" ver1.6.0.0)
    
Module "paypal_setup" has wrong version 1.4.0.2 in corrupted DB (reference DB contains "paypal_setup" ver1.6.0.2)
    
Module "persistent_setup" is not installed in corrupted DB
    Module 
"poll_setup" has wrong version 0.7.2 in corrupted DB (reference DB contains "poll_setup" ver1.6.0.0)
    
Module "productalert_setup" has wrong version 0.7.2 in corrupted DB (reference DB contains "productalert_setup" ver1.6.0.0)
    
Module "rating_setup" has wrong version 0.7.2 in corrupted DB (reference DB contains "rating_setup" ver1.6.0.0)
    
Module "reports_setup" has wrong version 0.7.10 in corrupted DB (reference DB contains "reports_setup" ver1.6.0.0.1)
    
Module "review_setup" has wrong version 0.7.6 in corrupted DB (reference DB contains "review_setup" ver1.6.0.0)
    
Module "salesrule_setup" has wrong version 1.4.0.0.6 in corrupted DB (reference DB contains "salesrule_setup" ver1.6.0.3)
    
Module "sales_setup" has wrong version 1.4.0.25 in corrupted DB (reference DB contains "sales_setup" ver1.6.0.7)
    
Module "sendfriend_setup" has wrong version 0.7.4 in corrupted DB (reference DB contains "sendfriend_setup" ver1.6.0.0)
    
Module "shipping_setup" has wrong version 0.7.0 in corrupted DB (reference DB contains "shipping_setup" ver1.6.0.0)
    
Module "sitemap_setup" has wrong version 0.7.2 in corrupted DB (reference DB contains "sitemap_setup" ver1.6.0.0)
    
Module "tag_setup" has wrong version 0.7.7 in corrupted DB (reference DB contains "tag_setup" ver1.6.0.0)
    
Module "tax_setup" has wrong version 1.4.0.1 in corrupted DB (reference DB contains "tax_setup" ver1.6.0.3)
    
Module "usa_setup" has wrong version 0.7.1 in corrupted DB (reference DB contains "usa_setup" ver1.6.0.1)
    
Module "weee_setup" has wrong version 0.13 in corrupted DB (reference DB contains "weee_setup" ver1.6.0.0)
    
Module "widget_setup" has wrong version 1.4.0.0.0 in corrupted DB (reference DB contains "widget_setup" ver1.6.0.0)
    
Module "wishlist_setup" has wrong version 0.7.9 in corrupted DB (reference DB contains "wishlist_setup" ver1.6.0.0)

This makes me think the live site never upgraded the database. Can anyone help me with a solution?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
fr0x
Member
 
Total Posts:  59
Joined:  2009-05-20
 

You can trigger Magento to think it hasn’t installed (and hence attempt to update an out of date database).

I would be extremely hesitant to do this on your live site but since it’s already broken......

Magento stores this set up information in the file app/etc/local.xml. If you’d like to run through the Setup Wizard again you do not have to download all the Magento files again. Just delete the local.xml file and any files and directories in the var/ directory and go back to http://www.yourDomain.com/magento with your browser. The Setup Wizard will run automatically again. (Why does this work? The Setup Wizard writes the values you provide during the setup process to the local.xml file and it will not run if it finds a local.xml file already. The var folder contains cached session information from the frontend and will have cached any previous settings, so deleting these files will prevent the incorrect cached content from being used.)

This is from: Magento Installation Cheat Sheet and is at the bottom of step 4

What happened to you was your test site upgraded the database fine because it truly was its “first install” on that box.  Your live site is obviously already installed and won’t trigger an install/upgrade.

Once again, I would do whatever backups you can before attempting this (especially the nuking of files to trigger that install) on a live site but it might be your only choice to get your db to upgrade.

 
Magento Community Magento Community
Magento Community
Magento Community
 
wabism
Jr. Member
 
Total Posts:  20
Joined:  2011-11-01
New York
 
fr0x - 18 April 2012 07:23 AM

You can trigger Magento to think it hasn’t installed (and hence attempt to update an out of date database).

I would be extremely hesitant to do this on your live site but since it’s already broken......

Magento stores this set up information in the file app/etc/local.xml. If you’d like to run through the Setup Wizard again you do not have to download all the Magento files again. Just delete the local.xml file and any files and directories in the var/ directory and go back to http://www.yourDomain.com/magento with your browser. The Setup Wizard will run automatically again. (Why does this work? The Setup Wizard writes the values you provide during the setup process to the local.xml file and it will not run if it finds a local.xml file already. The var folder contains cached session information from the frontend and will have cached any previous settings, so deleting these files will prevent the incorrect cached content from being used.)

This is from: Magento Installation Cheat Sheet and is at the bottom of step 4

What happened to you was your test site upgraded the database fine because it truly was its “first install” on that box.  Your live site is obviously already installed and won’t trigger an install/upgrade.

Once again, I would do whatever backups you can before attempting this (especially the nuking of files to trigger that install) on a live site but it might be your only choice to get your db to upgrade.

Delete any files or folders in the var/ directory? Does that mean delete the entire directory or just the var/cache, var/session, etc?

 
Magento Community Magento Community
Magento Community
Magento Community
 
fr0x
Member
 
Total Posts:  59
Joined:  2009-05-20
 

I just copied in what they had in that article but to be safe maybe just start with cache and session and remove that local.xml file and see if that triggers a new install.  For sure you will want the cache gone as that can contain cached settings.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top