Problem/Motivation
While upgrading from 7.x-4.0-rc11 to 7.x-5.8 first there were some dependencies like views and rules that were not met. I installed these dependencies and ran update.php
Steps to reproduce
1. Upgrade from 7.x-4.0-rc11 to 7.x-5.8
2. Install views, rules
3. Run update.php
4. Get the error:
Failed: DatabaseSchemaObjectExistsException: Cannot add unique key result_answer to table quiz_node_results_answers: unique key already exists. in DatabaseSchema_mysql->addUniqueKey() (line 430 of /home/customer/www/test.domain.com/public_html/includes/database/mysql/schema.inc).
quiz_question module
Update #7500
Failed: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1171 All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead: ALTER TABLE {quiz_question_properties} ADD `qqp_id` INT NULL auto_increment DEFAULT NULL, ADD PRIMARY KEY (`qqp_id`); Array ( ) in db_add_field() (line 2977 of /home/customer/www/test.domain.com/public_html/includes/database/database.inc).
long_answer module
Update #7500
Failed: DatabaseSchemaObjectExistsException: Cannot add field quiz_long_answer_user_answers.result_answer_id: field already exists. in DatabaseSchema_mysql->addField() (line 341 of /home/customer/www/test.domain.com/public_html/includes/database/mysql/schema.inc).
truefalse module
Update #7500
Failed: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1171 All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead: ALTER TABLE {quiz_truefalse_user_answers} ADD `answer_id` INT NULL auto_increment DEFAULT NULL, ADD PRIMARY KEY (`answer_id`); Array ( ) in db_add_field() (line 2977 of /home/customer/www/test.domain.com/public_html/includes/database/database.inc).
short_answer module
Update #7500
Failed: DatabaseSchemaObjectExistsException: Cannot add field quiz_short_answer_user_answers.result_answer_id: field already exists. in DatabaseSchema_mysql->addField() (line 341 of /home/customer/www/test.domain.com/public_html/includes/database/mysql/schema.inc).
multichoice module
Update #7502
Failed: DatabaseSchemaObjectExistsException: Cannot add field quiz_multichoice_user_answers.result_answer_id: field already exists. in DatabaseSchema_mysql->addField() (line 341 of /home/customer/www/test.domain.com/public_html/includes/database/mysql/schema.inc).
matching module
Update #7501
Failed: DatabaseSchemaObjectExistsException: Cannot add field quiz_matching_user_answers.result_answer_id: field already exists. in DatabaseSchema_mysql->addField() (line 341 of /home/customer/www/test.domain.com/public_html/includes/database/mysql/schema.inc).
While acessing the pages that contain my quizes I get the error
Error message
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.qnp_id' in 'field list': SELECT base.qnp_id AS qnp_id, base.vid AS vid, base.nid AS nid, base.uid AS uid, base.number_of_random_questions AS number_of_random_questions, base.max_score_for_random AS max_score_for_random, base.pass_rate AS pass_rate, base.summary_pass AS summary_pass, base.summary_pass_format AS summary_pass_format, base.summary_default AS summary_default, base.summary_default_format AS summary_default_format, base.randomization AS randomization, base.backwards_navigation AS backwards_navigation, base.keep_results AS keep_results, base.repeat_until_correct AS repeat_until_correct, base.quiz_open AS quiz_open, base.quiz_close AS quiz_close, base.takes AS takes, base.show_attempt_stats AS show_attempt_stats, base.time_limit AS time_limit, base.quiz_always AS quiz_always, base.time_left AS time_left, base.max_score AS max_score, base.allow_skipping AS allow_skipping, base.allow_resume AS allow_resume, base.allow_jumping AS allow_jumping, base.allow_change AS allow_change, base.allow_change_blank AS allow_change_blank, base.build_on_last AS build_on_last, base.show_passed AS show_passed, base.mark_doubtful AS mark_doubtful, base.review_options AS review_options, base.result_type AS result_type FROM {quiz_node_properties} base WHERE (base.vid IN (:db_condition_placeholder_0)) ; Array ( [:db_condition_placeholder_0] => 4858 ) in EntityAPIController->query() (line 193 of /home/customer/www/test.domain.com/public_html/sites/all/modules/entity/includes/entity.controller.inc).
The website encountered an unexpected error. Please try again later.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes