From 896f1e0380cd5e79eb6fda1a4e0ae0764beebfcc Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Mon, 30 Apr 2007 08:46:39 +0000 Subject: [PATCH] events and grades db fixes --- lib/db/install.xml | 9 ++++++--- lib/db/upgrade.php | 27 +++++++++++++++++++++++++++ version.php | 2 +- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/lib/db/install.xml b/lib/db/install.xml index 165dac6e7b..b11d398b13 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1192,7 +1192,9 @@ - + + + @@ -1348,8 +1350,9 @@ - - + + + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index c8e8457fea..712aed56b0 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -1114,6 +1114,33 @@ function xmldb_main_upgrade($oldversion=0) { $result = $result && add_field($table, $field); } + if ($result && $oldversion < 2007043001) { + + /// Define field informationformat to be added to grade_grades_text + $table = new XMLDBTable('grade_grades_text'); + $field = new XMLDBField('informationformat'); + $field->setAttributes(XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null, null, '0', 'information'); + + /// Launch add field informationformat + $result = $result && add_field($table, $field); + + /// Define field schedule to be added to events_handlers + $table = new XMLDBTable('events_handlers'); + $field = new XMLDBField('schedule'); + $field->setAttributes(XMLDB_TYPE_CHAR, '255', null, null, null, null, null, null, 'handlerfunction'); + + /// Launch add field schedule + $result = $result && add_field($table, $field); + + /// Define field status to be added to events_handlers + $table = new XMLDBTable('events_handlers'); + $field = new XMLDBField('status'); + $field->setAttributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'schedule'); + + /// Launch add field status + $result = $result && add_field($table, $field); + } + return $result; } diff --git a/version.php b/version.php index 72b03af394..484abc5095 100644 --- a/version.php +++ b/version.php @@ -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 = 2007043000; // YYYYMMDD = date + $version = 2007043001; // YYYYMMDD = date // XY = increments within a single day $release = '1.9 dev'; // Human-friendly version name -- 2.39.5