Check out the LimeSurvey source code on GitHub!

Database update failed

More
4 years 1 month ago #89446 by ricardo01
I'm upgrading my current installation but it fails at the database upgrade stage...see picture below. Thanks for your help!

Attachments:

Please Log in to join the conversation.

More
4 years 1 month ago #89448 by seanrife
Can you access the database (through phpMyAdmin, for example) and see if the table does, in fact, exist? Have you made any changes to the database using any program other than LimeSurvey?

Please Log in to join the conversation.

More
4 years 1 month ago #89449 by ricardo01
Yes, I can. And the database does not exist. I haven't made any changes to the database.

rg

Please Log in to join the conversation.

More
4 years 1 month ago #89451 by ricardo01
Let me clarify: the database DOES exist. The table 'surveys.lime_survey_links' DOES NOT exist

Please Log in to join the conversation.

More
4 years 1 month ago #89452 by c_schmitz
It should exist. If it doesn't create it manually before starting the update.

Best regards

Carsten Schmitz
LimeSurvey project leader

Please Log in to join the conversation.

More
4 years 1 month ago #89453 by ricardo01
Nope, the table doesn't exist...I just double-checked. I guess that's why I'm getting the error. I'll create it manually. How many fields does the 'surveys.lime_survey_links' have?

rg

Please Log in to join the conversation.

More
4 years 1 month ago #89454 by seanrife
You should be able to execute this query to create the table (but double-check to make sure the name is correct):
CREATE TABLE IF NOT EXISTS `surveys.lime_survey_links` (
  `participant_id` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `token_id` int(11) NOT NULL,
  `survey_id` int(11) NOT NULL,
  `date_created` datetime DEFAULT NULL,
  `date_invited` datetime DEFAULT NULL,
  `date_completed` datetime DEFAULT NULL,
  PRIMARY KEY (`participant_id`,`token_id`,`survey_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
The following user(s) said Thank You: ocean

Please Log in to join the conversation.

More
4 years 1 month ago #89456 by ricardo01
Thank you!almost there...I was able to run the query and create the table. But now I get this error: Column already exists: 1060 Duplicate column name 'date_invited'

Please Log in to join the conversation.

More
4 years 1 month ago #89460 by seanrife
You get that message when you run the query, or when you try to run the update?

Please Log in to join the conversation.

More
4 years 1 month ago - 4 years 1 month ago #89464 by ricardo01
The query was fine and I was able to create the table. I get the error only when I try to run the update
Last Edit: 4 years 1 month ago by ricardo01.

Please Log in to join the conversation.

More
4 years 1 month ago #89469 by seanrife
Hmmm... I suppose the next logical move is to delete that variable from the table, then try again. But I suspect there is something else going on here that I'm just not thinking of. Do you have backups of the database that you can revert to? That might be worth a shot as well. It strikes me as odd that the table was missing in the first place...

Also, I'm wondering if trying to access the tokens feature in LS might tell us more about what's going on. Are you using tokens (i.e., have you initialized tokens for any of your surveys)? Perhaps you could create a dummy survey (just copy some of your existing questions/groups), then initialize tokens for it and see what happens (of course, make backups before doing anyting! ;) ).

Sorry I can't be more specific - I just need a little more information about what's going on.

Please Log in to join the conversation.

More
4 years 1 month ago #89486 by Mazi

ricardo wrote: Thank you!almost there...I was able to run the query and create the table. But now I get this error: Column already exists: 1060 Duplicate column name 'date_invited'

Is it possible that the updater is looking for that table to add the "date_invited" column afterwards and thus this problems shows up if that column was already created manually?!?

Try deleting that column and run the update again.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
4 years 1 month ago #89499 by ricardo01
I deleted the "date_invited" variable and ran update again...
then I got a new error message, this time "duplicate column 'date_completed'" So I also deleted that field and ran the update again...and voila! Finally I got the "database successfully updated to version 164"

I checked the database and the updater automatically added the 'date_invited' and the 'date_completed' fields automatically...as Mazi said.

Thank you all

Please Log in to join the conversation.

More
4 years 1 month ago #89511 by Mazi

ricardo wrote: I deleted the "date_invited" variable and ran update again...
then I got a new error message, this time "duplicate column 'date_completed'" So I also deleted that field and ran the update again...and voila! Finally I got the "database successfully updated to version 164"

I checked the database and the updater automatically added the 'date_invited' and the 'date_completed' fields automatically...as Mazi said.

Thank you all

You're welcome!


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
4 years 1 month ago #90193 by ocean
the same error over here

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form