From ec0009c3a4865514c8ba6d76d1d295a0aa85b95b Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Thu, 3 May 2007 01:43:33 +0000 Subject: [PATCH] MDL-9506 Added childrentype field to grade_categories table --- lib/db/install.xml | 9 +++++---- lib/db/upgrade.php | 13 +++++++++++-- version.php | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/lib/db/install.xml b/lib/db/install.xml index cce42d062a..2df209577a 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -1272,8 +1272,9 @@ - - + + + @@ -1424,4 +1425,4 @@ - + \ No newline at end of file diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 6840ef82dd..fe07f9935e 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -1151,9 +1151,18 @@ function xmldb_main_upgrade($oldversion=0) { /// Launch add field theme $result = $result && add_field($table, $field); } + if ($result && $oldversion < 2007050300) { - return $result; - + // Define field childrentype to be added to grade_categories + $table = new XMLDBTable('grade_categories'); + $field = new XMLDBField('childrentype'); + $field->setAttributes(XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'parent'); + + // Launch add field childrentype + $result = $result && add_field($table, $field); + } + + return $result; } ?> diff --git a/version.php b/version.php index 244b6b9795..8d308f0349 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 = 2007050201; // YYYYMMDD = date + $version = 2007050300; // YYYYMMDD = date // XY = increments within a single day $release = '1.9 dev'; // Human-friendly version name -- 2.39.5