From 45645bce2ace3a8a5129256311f13f379bfef3cc Mon Sep 17 00:00:00 2001 From: Penny Leach Date: Tue, 17 Nov 2009 15:44:21 +0000 Subject: [PATCH] Portfolio MDL-20872 first step - add tempdataid column to portfolio log table --- lib/db/install.xml | 5 +++-- lib/db/upgrade.php | 15 +++++++++++++++ version.php | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/lib/db/install.xml b/lib/db/install.xml index a936b93831..381b5e4a55 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -1996,7 +1996,8 @@ - + + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 95e8ea428f..5aaec6ef03 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -2781,6 +2781,21 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL"); upgrade_main_savepoint($result, 2009111600); } + if ($result && $oldversion < 2009111700) { + + /// Define field tempdataid to be added to portfolio_log + $table = new xmldb_table('portfolio_log'); + $field = new xmldb_field('tempdataid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'caller_sha1'); + + /// Conditionally launch add field tempdataid + if (!$dbman->field_exists($table, $field)) { + $dbman->add_field($table, $field); + } + + /// Main savepoint reached + upgrade_main_savepoint($result, 2009111700); + } + return $result; } diff --git a/version.php b/version.php index 0b4b676101..af1342b7b7 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 = 2009111600; // YYYYMMDD = date of the last version bump + $version = 2009111700; // YYYYMMDD = date of the last version bump // XX = daily increments $release = '2.0 dev (Build: 20091117)'; // Human-friendly version name -- 2.39.5