You are here

function quiz_update_7517 in Quiz 7.5

We removed the 'aid' field from schema definition, but left the data for possible migration. Adding a new Quiz after this results in an issue because we also removed it from defaults. If the field exists, set the default to NULL.

File

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

Code

function quiz_update_7517() {
  if (db_field_exists('quiz_node_properties', 'aid')) {
    db_change_field('quiz_node_properties', 'aid', 'aid', array(
      'type' => 'varchar',
      'length' => 255,
      'not null' => FALSE,
    ));
  }
}