Manual upgrade - SQL error

4 years 5 months ago #117310 by teleute
I'm trying to run a manual upgrade from 1.92 to 2.05 (the ComfortClick update kept failing with what may have been a timeout error? Googled it and everyone just told people with that error to update manually and it'd be fine).

I followed the instructions at . When it gets to the step where it wants to upgrade my db, it starts and then returns the following error:

An non-recoverable error happened during the update. Error details:
CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'PRIMARY'; check that column/key exists

I bumped the user's permissions up to full globally, just in case, but same issue. I feel like it's trying to drop a table that doesn't exist, but I can't figure out which one. Is there either a list of the tables it's trying to drop, or better yet, a log somewhere that would be detailing the results of all of the installation steps?

Thank you!

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
4 years 5 months ago #117366 by teleute
Replied by teleute on topic Manual upgrade - SQL error
Ran a command to list all primary keys in the db, and saw that every table other than <prefix>_answers had a primary key. (Not sure why...?)

Ran the command 'ALTER TABLE <db_name>.<prefix>_answers ADD aid INT PRIMARY KEY AUTO_INCREMENT UNIQUE FIRST;' to add an auto-incremented primary key and then the upgrade ran just fine.

Not sure why this was necessary, or whether it will have any ill effects. Hopefully if anyone knows of any problems it may cause they can comment here. :-) However, poking through after the upgrade, so far all seems well.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!