From e7a89237de6e7b68e75fbca9ca96ff1ba5a04d6a Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sat, 15 Dec 2007 00:49:05 +0000 Subject: [PATCH] Modify some timezone fields to accept new olson files. MDL-12024 Merged from MOODLE_19_STABLE --- lib/db/install.xml | 8 ++++---- lib/db/upgrade.php | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/lib/db/install.xml b/lib/db/install.xml index f2553a63a7..9aeee707fa 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -419,12 +419,12 @@ - + - + @@ -1681,4 +1681,4 @@ - \ No newline at end of file + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 3967a937e2..0c4652b637 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -2633,6 +2633,28 @@ function xmldb_main_upgrade($oldversion=0) { $result = $result && set_field('course', 'format', 'weeks', 'format', 'weekscss'); } + if ($result && $oldversion < 2007101505) { + + /// Changing precision of field dst_time on table timezone to (6) + $table = new XMLDBTable('timezone'); + $field = new XMLDBField('dst_time'); + $field->setAttributes(XMLDB_TYPE_CHAR, '6', null, XMLDB_NOTNULL, null, null, null, '00:00', 'dst_skipweeks'); + + /// Launch change of precision for field dst_time + $result = $result && change_field_precision($table, $field); + + /// Changing precision of field std_time on table timezone to (6) + $table = new XMLDBTable('timezone'); + $field = new XMLDBField('std_time'); + $field->setAttributes(XMLDB_TYPE_CHAR, '6', null, XMLDB_NOTNULL, null, null, null, '00:00', 'std_skipweeks'); + + /// Launch change of precision for field std_time + $result = $result && change_field_precision($table, $field); + + /// Main savepoint reached + upgrade_main_savepoint($result, 2007101505); + } + return $result; } -- 2.39.5