Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Manual upgrade - SQL error

  • teleute
  • teleute's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 month ago #117310 by teleute
Manual upgrade - SQL error was created 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 manual.limesurvey.org/Upgrading_from_a_previous_version . 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!
The topic has been locked.
  • teleute
  • teleute's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 month 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.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose