function quiz_update_7501 in Quiz 7.5
Same name and namespace in other branches
- 7.6 quiz.install \quiz_update_7501()
Add new result_answer_id field to the quiz_node_results_answers table.
File
- ./
quiz.install, line 875 - Quiz install schema for installing the quiz module.
Code
function quiz_update_7501() {
db_drop_primary_key('quiz_node_results_answers');
db_add_unique_key('quiz_node_results_answers', 'result_answer', array(
'result_id',
'question_nid',
'question_vid',
));
$spec = array(
'description' => 'The result answer ID.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
);
db_add_field('quiz_node_results_answers', 'result_answer_id', $spec, array(
'primary key' => array(
'result_answer_id',
),
));
return t('Added new result_answer_id field to the quiz_node_results_answers table.');
}