1

An extension we use has released several versions since our last update, we'll say that I started on 1.0 and was trying to upgrade to 1.5. During the update to the latest version I encountered an error (the server began returning 500's) and the error logs indicated that the setup script for 1.3 to 1.4 was breaking. I was able to recover by reverting the code changes to version 1.3.

Magento's core_resource table shows that version 1.5 is installed, which isn't correct. The schema appears that the database is in fact from 1.3, and so I've left the code at that version as well.

mysql> select * from core_resource where code = 'myextension_setup';
+--------------------+---------+--------------+
| code               | version | data_version |
+--------------------+---------+--------------+
| myextension_setup  | 1.5.0   | 1.5.0        |
+--------------------+---------+--------------+

My impression is that I just need to update version and data_version in core_resource in order to re-run the setup scripts. What other steps are needed before I can re-attempt the upgrade?

What steps should I take to re-attempt the upgrade, after identifying and resolving the cause of the server errors with 1.5? Do I need to review each step of the 1.4 and 1.5 setup scripts to ensure that they haven't already been run?

1
1

It's not clear what you mean by "setup script for 1.3 to 1.4 was breaking". Are you saying the update scripts ran, but the changes applied to the DB broke your site or the upgrade script actually failed?

The 1.5.0 records in core_resource indicate that your extension ran all of the update scripts without critical errors. If something broke between 1.3.0 and 1.4.0, then you would have 1.3.0 in core_resource.

In any case, if you want to re-attempt it, remove all extension files (just to be safe) and reinstall the latest files. Immediately remove myextension_setup records from core_resource. Refresh browser to trigger the scripts. If the update scripts are written well, you should be able to install this extension without any problems.

If you want to start from a certain version, you can insert that version number into core_recourse as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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