MDL-20636 quiz_attempts.sumgrades should be nullable. #224

This commit is contained in:
Tim Hunt 2011-03-11 13:45:03 +00:00
parent 42e6506ebe
commit c8b3ad7c46
2 changed files with 14 additions and 1 deletions

View File

@ -53,4 +53,17 @@ function xmldb_local_qedatabase_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2008000703, 'local', 'qedatabase');
}
if ($oldversion < 2008000704) {
// Changing nullability of field sumgrades on table quiz_attempts to null
$table = new xmldb_table('quiz_attempts');
$field = new xmldb_field('sumgrades', XMLDB_TYPE_NUMBER, '10, 5', null, null, null, null, 'attempt');
// Launch change of nullability for field sumgrades
$dbman->change_field_notnull($table, $field);
// quiz savepoint reached
upgrade_plugin_savepoint(true, 2008000704, 'local', 'qedatabase');
}
}

View File

@ -26,5 +26,5 @@
defined('MOODLE_INTERNAL') || die;
$plugin->version = 2008000703;
$plugin->version = 2008000704;
$plugin->requires = 2010080300;