1

The mysql upgrade file did not update the database after a patch. I checked the code in the mysql upgrade file and the changes in the file weren't applied to the database. Is there a way to re-run these upgrade scripts manually?

1 Answer 1

2

Magento stores the current version for each setup resource in the core_resource database table. So if your script was

foo_setup/upgrade-1.0.0-1.0.1.php

you need to look for code="foo_setup" in this table and change the version numbers from "1.0.1" back to "1.0.0". Then the upgrade script will be triggered again by the next request.

1
  • 1
    Careful doing this. It will indeed be triggered by the next request, that encounters an empty configuration cache. This does not need to be one request, but can be multiple with unreliable results. Best do this with maintenance flag on and using n98-magerun sys:setup:incremental. This also allows you to see if it succeeds and possibly why it does not.
    – user4351
    Nov 5, 2015 at 8:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.