You are here

function quiz_update_7402 in Quiz 8.4

Same name and namespace in other branches
  1. 7.6 quiz.install \quiz_update_7402()
  2. 7.4 quiz.install \quiz_update_7402()
  3. 7.5 quiz.install \quiz_update_7402()

Implements hook_update_N

File

./quiz.install, line 712
Quiz install schema for installing the quiz module

Code

function quiz_update_7402(&$sandbox) {
  if (!db_field_exists('quiz_node_properties', 'summary_pass_format')) {
    db_add_field('quiz_node_properties', 'summary_pass_format', array(
      'type' => 'varchar',
      'length' => 255,
    ));
    db_add_field('quiz_node_properties', 'summary_default_format', array(
      'type' => 'varchar',
      'length' => 255,
    ));
    db_add_field('quiz_node_result_options', 'option_summary_format', array(
      'type' => 'varchar',
      'length' => 255,
    ));
    db_add_field('quiz_user_settings', 'summary_pass_format', array(
      'type' => 'varchar',
      'length' => 255,
    ));
    db_add_field('quiz_user_settings', 'summary_default_format', array(
      'type' => 'varchar',
      'length' => 255,
    ));
  }
  return t("Added new format fields to the tables if they didn't already exist.");
}