upgrade_mod_savepoint(true, 2010042800, 'data');
}
+ //rerun the upgrade see MDL-24470
+ if ($oldversion < 2010100101) {
+ // Upgrade all the data->notification currently being
+ // NULL to 0
+ $sql = "UPDATE {data} SET notification=0 WHERE notification IS NULL";
+ $DB->execute($sql);
+
+ $table = new xmldb_table('data');
+ $field = new xmldb_field('notification', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', 'editany');
+ // First step, Set NOT NULL
+ $dbman->change_field_notnull($table, $field);
+ // Second step, Set default to 0
+ $dbman->change_field_default($table, $field);
+ upgrade_mod_savepoint(true, 2010100101, 'data');
+ }
+
return true;
}
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2010080300;
+$module->version = 2010100101;
$module->requires = 2010080300; // Requires this Moodle version
$module->cron = 60;