You are here

function quiz_update_7506 in Quiz 7.5

Same name and namespace in other branches
  1. 7.6 quiz.install \quiz_update_7506()

Add qnp_id and uid so we can have better quiz node defaults.

File

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

Code

function quiz_update_7506() {
  db_drop_primary_key('quiz_node_properties');
  db_add_field('quiz_node_properties', 'qnp_id', array(
    'type' => 'serial',
    'not null' => TRUE,
  ), array(
    'primary key' => array(
      'qnp_id',
    ),
  ));
  db_add_field('quiz_node_properties', 'uid', array(
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ));

  // We could do this, but we should really migrate user settings from 4.x.
  // Patches welcome.
  // db_drop_table('quiz_user_settings');
}