You are here

function quiz_update_7504 in Quiz 7.5

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

Allow time_start and time_end to be NULL. The time "0" is still a valid time. This lets us do better filtering in Views (where NULL).

File

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

Code

function quiz_update_7504() {
  $spec = array(
    'type' => 'int',
    'unsigned' => FALSE,
  );
  db_change_field('quiz_node_results', 'time_start', 'time_start', $spec);
  db_change_field('quiz_node_results', 'time_end', 'time_end', $spec);
  db_query("UPDATE {quiz_node_results} SET time_end = NULL WHERE time_end = 0");
  return t('Removed default attribute from field time_start and time_end in quiz_node_results table.');
}