From 5e3572ff0bac11cddd77d99995f0ed11ec7e9205 Mon Sep 17 00:00:00 2001 From: vyshane Date: Thu, 13 Apr 2006 03:11:32 +0000 Subject: [PATCH] Added default values for not nulls. --- mod/lesson/db/mysql.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/mod/lesson/db/mysql.php b/mod/lesson/db/mysql.php index 38efc8c149..8634044195 100644 --- a/mod/lesson/db/mysql.php +++ b/mod/lesson/db/mysql.php @@ -71,31 +71,31 @@ function lesson_upgrade($oldversion) { if ($oldversion < 2004072100) { execute_sql(" create table ".$CFG->prefix."lesson_high_scores ( id int(10) unsigned not null auto_increment, - lessonid int(10) unsigned not null, - userid int(10) unsigned not null, - gradeid int(10) unsigned not null, - nickname varchar(5) not null, + lessonid int(10) unsigned not null default '0', + userid int(10) unsigned not null default '0', + gradeid int(10) unsigned not null default '0', + nickname varchar(5) not null default '', PRIMARY KEY (`id`) )"); execute_sql(" create table ".$CFG->prefix."lesson_branch ( id int(10) unsigned not null auto_increment, - lessonid int(10) unsigned not null, - userid int(10) unsigned not null, - pageid int(10) unsigned not null, - retry int(10) unsigned not null, - flag tinyint(3) unsigned not null, - timeseen int(10) unsigned not null, + lessonid int(10) unsigned not null default '0', + userid int(10) unsigned not null default '0', + pageid int(10) unsigned not null default '0', + retry int(10) unsigned not null default '0', + flag tinyint(3) unsigned not null default '0', + timeseen int(10) unsigned not null default '0', PRIMARY KEY (`id`) )"); execute_sql(" create table ".$CFG->prefix."lesson_timer ( id int(10) unsigned not null auto_increment, - lessonid int(10) unsigned not null, - userid int(10) unsigned not null, - starttime int(10) unsigned not null, - lessontime int(10) unsigned not null, + lessonid int(10) unsigned not null default '0', + userid int(10) unsigned not null default '0', + starttime int(10) unsigned not null default '0', + lessontime int(10) unsigned not null default '0', PRIMARY KEY (`id`) )"); -- 2.39.5