From: moodler Date: Thu, 24 Jun 2004 08:23:16 +0000 (+0000) Subject: Added timestart and timeend field to user_teachers table X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=faef9f7b8c52e9d9bbcc34e6d19451183344199a;p=moodle.git Added timestart and timeend field to user_teachers table (in preparation for enrollment architecture) --- diff --git a/lib/db/mysql.php b/lib/db/mysql.php index 935c8b538d..9677fc148a 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -775,6 +775,11 @@ function main_upgrade($oldversion=0) { table_column('user', "", 'maildigest', 'tinyint', '1', '', '0', 'not null', 'mailformat'); } + if ($oldversion < 2004062400) { + table_column('user_teachers', "", 'timeend', 'int', '10', 'unsigned', '0', 'not null', 'editall'); + table_column('user_teachers', "", 'timestart', 'int', '10', 'unsigned', '0', 'not null', 'editall'); + } + return $result; } diff --git a/lib/db/mysql.sql b/lib/db/mysql.sql index 391ac4fb0c..31d76d04c8 100644 --- a/lib/db/mysql.sql +++ b/lib/db/mysql.sql @@ -404,6 +404,8 @@ CREATE TABLE `prefix_user_teachers` ( `authority` int(10) NOT NULL default '3', `role` varchar(40) NOT NULL default '', `editall` int(1) unsigned NOT NULL default '1', + `timestart` int(10) unsigned NOT NULL default '0', + `timeend` int(10) unsigned NOT NULL default '0', `timemodified` int(10) unsigned NOT NULL default '0', `timeaccess` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`id`), diff --git a/lib/db/postgres7.php b/lib/db/postgres7.php index 9c570862b8..a76a30a1e5 100644 --- a/lib/db/postgres7.php +++ b/lib/db/postgres7.php @@ -517,6 +517,11 @@ function main_upgrade($oldversion=0) { table_column('user', "", 'maildigest', 'smallint', '1', '', '0', 'not null', 'mailformat'); } + if ($oldversion < 2004062400) { + table_column('user_teachers', "", 'timeend', 'int', '10', 'unsigned', '0', 'not null', 'editall'); + table_column('user_teachers', "", 'timestart', 'int', '10', 'unsigned', '0', 'not null', 'editall'); + } + return $result; } diff --git a/lib/db/postgres7.sql b/lib/db/postgres7.sql index 3034f5781c..79efebec9e 100644 --- a/lib/db/postgres7.sql +++ b/lib/db/postgres7.sql @@ -264,6 +264,8 @@ CREATE TABLE prefix_user_teachers ( authority integer NOT NULL default '3', role varchar(40) NOT NULL default '', editall integer NOT NULL default '1', + timestart integer NOT NULL default '0', + timeend integer NOT NULL default '0', timemodified integer NOT NULL default '0', timeaccess integer NOT NULL default '0' ); diff --git a/version.php b/version.php index ab54a42fc0..316df1b885 100644 --- a/version.php +++ b/version.php @@ -5,7 +5,7 @@ // database to determine whether upgrades should // be performed (see lib/db/*.php) -$version = 2004060400; // The current version is a date (YYYYMMDDXX) +$version = 2004062400; // The current version is a date (YYYYMMDDXX) $release = "1.4 development"; // User-friendly version number