Changes to mdl_user:

* Change timezone to varchar(100) (to support non-trivial timezones)
* Drop timezonename (will not be used after all)
This commit is contained in:
defacer 2005-04-08 19:50:01 +00:00
parent f3729a941d
commit 68c0264e1b
5 changed files with 13 additions and 5 deletions

View File

@ -1318,6 +1318,11 @@ function main_upgrade($oldversion=0) {
execute_sql('ALTER TABLE `'.$CFG->prefix.'course_modules` DROP `deleted`'); // Old field
}
if ($oldversion < 2005040800) {
table_column('user', 'timezone', 'timezone', 'varchar', '100', '', '99');
execute_sql(" ALTER TABLE `{$CFG->prefix}user` DROP `timezonename` ");
}
return $result;
}

View File

@ -536,8 +536,7 @@ CREATE TABLE `prefix_user` (
`country` char(2) default NULL,
`lang` varchar(10) default 'en',
`theme` varchar(50) NOT NULL default '',
`timezone` float NOT NULL default '99',
`timezonename` varchar(100) NOT NULL default '',
`timezone` varchar(100) NOT NULL default '99',
`firstaccess` int(10) unsigned NOT NULL default '0',
`lastaccess` int(10) unsigned NOT NULL default '0',
`lastlogin` int(10) unsigned NOT NULL default '0',

View File

@ -1034,6 +1034,11 @@ function main_upgrade($oldversion=0) {
execute_sql('ALTER TABLE '.$CFG->prefix.'course_modules DROP deleted;'); // Old field
}
if ($oldversion < 2005040800) {
table_column('user', 'timezone', 'timezone', 'varchar', '100', '', '99');
execute_sql(" ALTER TABLE `{$CFG->prefix}user` DROP `timezonename` ");
}
return $result;
}

View File

@ -374,8 +374,7 @@ CREATE TABLE prefix_user (
country char(2) default NULL,
lang varchar(10) NOT NULL default '',
theme varchar(50) NOT NULL default '',
timezone float NOT NULL default '99',
timezonename varchar(100) NOT NULL default '',
timezone varchar(100) NOT NULL default '99',
firstaccess integer NOT NULL default '0',
lastaccess integer NOT NULL default '0',
lastlogin integer NOT NULL default '0',

View File

@ -6,7 +6,7 @@
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
$version = 2005033100; // YYYYMMDD = date
$version = 2005040800; // YYYYMMDD = date
// XY = increments within a single day
$release = '1.5 UNSTABLE DEVELOPMENT'; // Human-friendly version name