I have a quiz module I have upgraded from a 6.x to 7.x where the first version I used was alpha9.

Comments

Hello,
I had the same error, so I verificated the code of update and I noticed that there is a function that is used only for drupal 6 updates, it is in line 145 of /quiz/questions_types/short_answer/short_answer.install:

/**
* Implementation of hook_update_N()
*
* Adding feedback field to table {quiz_short_answer_user_answers}
*
function short_answer_update_6401() {
  $to_return = array();
  $spec = array(
    'type' => 'text',
    'not null' => FALSE,
  );
  db_add_field($to_return, 'quiz_short_answer_user_answers', 'answer_feedback', $spec);
  return $to_return;
}*/

Besides I noticed that the correct function is in the same file, it is in line 137

/**
* Adding feedback field to table {quiz_short_answer_user_answers}
*/
function short_answer_update_7401() {
  $spec = array(
    'type' => 'text',
    'not null' => FALSE,
  );
  db_add_field('quiz_short_answer_user_answers', 'answer_feedback', $spec);
}

In order to know more about the diference I recomend you to view: db_add_field/7 and db_add_field/6. hook_update_N/7 is useful too.

To solve the problem I only comment the first function and run the update.php I hope it could help you.
Regards from Perú.

To confirm, #1 worked for me. Commenting out the function seemed to have resolved the issue.

Removing that function worked for me as well.

Status:Active» Fixed

With respect to 7.x branch short_answer_update_6401() is no longer there in short_answer.install

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.