Missing 'auto_increment' on assignment_submissions table, for 'id'

This commit is contained in:
martin 2002-08-07 08:46:48 +00:00
parent 989bfa9d7b
commit c679054a0a
2 changed files with 7 additions and 3 deletions

View File

@ -21,7 +21,7 @@ CREATE TABLE `assignment` (
#
CREATE TABLE `assignment_submissions` (
`id` int(10) unsigned NOT NULL default '0',
`id` int(10) unsigned NOT NULL auto_increment,
`assignment` int(10) unsigned NOT NULL default '0',
`user` int(10) unsigned NOT NULL default '0',
`timecreated` int(10) unsigned NOT NULL default '0',

View File

@ -5,7 +5,7 @@
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
$module->version = 2002080500;
$module->version = 2002080701;
$module->cron = 60;
function assignment_upgrade($oldversion) {
@ -51,8 +51,12 @@ function assignment_upgrade($oldversion) {
execute_sql(" INSERT INTO log_display VALUES ('assignment', 'update', 'assignment', 'name') ");
execute_sql(" INSERT INTO log_display VALUES ('assignment', 'view submissions', 'assignment', 'name') ");
execute_sql(" INSERT INTO log_display VALUES ('assignment', 'upload', 'assignment', 'name') ");
}
if ($oldversion < 2002080701) {
execute_sql(" ALTER TABLE `assignment_submissions` CHANGE `id` `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT ");
}
return true;
}