Sometimes when updating Magento to a new version we need not only to update the database structure, but also save our data. For this reason it is necessary first to back up the database and only then try to update it. In some cases, due to external table restrictions we can not run updates, but we can temporary disable the external restrictions set up for the table data.
Take the configuration file app/etc/local.xml:
1 2 3 4 5 6 7 |
<default_setup> <connection> ... <initStatements><![CDATA[SET NAMES utf8]]></initStatements> ... </connection> </default_setup> |
And add the expression SET FOREIGN_KEY_CHECKS=0; which disables the verification of external keys for the current connection:
1 2 3 4 5 6 7 8 9 |
<default_setup> <connection> ... <initStatements> <![CDATA[SET NAMES utf8; SET FOREIGN_KEY_CHECKS=0;]]> </initStatements> ... </connection> </default_setup> |
After that you can try to update, and when the update finishes, delete the added expression.
Partner With Us
Looking for a partner to grow your business? We are the right company to bring your webstore to success.
Talk to Igor