Database error during upgrage from .12 to .13

Hi All



just tried my first update and got the following.



Database error: Unknown column ‘b.section_id’ in ‘field list’ (1054)

Invalid query: SELECT b.privilege, b.section_id FROM cscart_privileges as a LEFT JOIN cscart_privilege_descriptions as b ON b.privilege = a.privilege AND b.lang_code = ‘EN’



I cant do ANYTHING, get in to admin or ANYTHING!



If I refresh the page I get



Database error: Unknown column ‘a.position’ in ‘order clause’ (1054)

Invalid query: SELECT a.*, b.description FROM cscart_currencies as a LEFT JOIN cscart_currency_descriptions as b ON a.currency_code = b.currency_code AND lang_code = ‘EN’ WHERE status = ‘A’ ORDER BY a.position



HELP!!!

[quote name=‘mdj101’]Hi All



just tried my first update and got the following.



Database error: Unknown column ‘b.section_id’ in ‘field list’ (1054)

Invalid query: SELECT b.privilege, b.section_id FROM cscart_privileges as a LEFT JOIN cscart_privilege_descriptions as b ON b.privilege = a.privilege AND b.lang_code = ‘EN’

[/QUOTE]

I hope you have a backup or are at least working on a test site (preferably both). The above error sounds like at least some of the queries in uc.sql were not executed - section_id was just added to the _privileges_description database. In fact, so was the ‘position’ field in _currencies.



You can open /var/upgrade/upgrade_2.0.12-2.0.13.tgz/uc.sql and copy, then paste the queries into the SQL tab of phpMyAdmin. If none of the queries was executed then you should have no problems. After that, you would need to point your browser to /var/upgrade/upgrade_2.0.12-2.0.13.tgz/uc.php which appears to be where you were receiving the first error message.



It’s a good idea to take a backup before attempting any further changes.



The best solution if you have a backup is to restore both the files and database and try again - hopefully it was just a hiccup of some kind.



Bob

Hi Bob



I copied the cscart folder and db before update. Ive just re-installed the folder and all is working again, however tried to update again and the same error.



Seems strange why it wont execute this.



I will try the manual way as you have described.

RESOLVED



It was a MySQL permissions issue. The user I created didnt have any ALTER privileges.

Good to hear. Make sure you execute the uc.php file - it crashed at line 20 so nothing from that point forward was done.



Bob

Hi Bob



I ran the upgrade from admin.

Database error: Unknown column ‘a.position’ in ‘order clause’ (1054)

Invalid query: SELECT a.*, b.description FROM cscart_currencies as a LEFT JOIN cscart_currency_descriptions as b ON a.currency_code = b.currency_code AND lang_code = ‘EN’ WHERE status = ‘A’ ORDER BY a.position

You need to make sure the database user has ALTER priviledges