From: Penny Leach Date: Tue, 17 Nov 2009 15:59:26 +0000 (+0000) Subject: Portfolio MDL-20872 adding some extra metadata into the portfolio log table so we... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=eeb7ccf06939636aeb28e979c9da7d51a53f9e1a;p=moodle.git Portfolio MDL-20872 adding some extra metadata into the portfolio log table so we can display nicer information about already completed transfers --- diff --git a/lib/db/install.xml b/lib/db/install.xml index 381b5e4a55..f7cf812c94 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1997,7 +1997,9 @@ - + + + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 5aaec6ef03..341424d4e0 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -2796,6 +2796,36 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL"); upgrade_main_savepoint($result, 2009111700); } + if ($result && $oldversion < 2009111701) { + + /// Define field returnurl to be added to portfolio_log + $table = new xmldb_table('portfolio_log'); + $field = new xmldb_field('returnurl', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, 'tempdataid'); + + /// Conditionally launch add field returnurl + if (!$dbman->field_exists($table, $field)) { + $dbman->add_field($table, $field); + } + + /// Main savepoint reached + upgrade_main_savepoint($result, 2009111701); + } + + if ($result && $oldversion < 2009111702) { + + /// Define field continueurl to be added to portfolio_log + $table = new xmldb_table('portfolio_log'); + $field = new xmldb_field('continueurl', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, 'returnurl'); + + /// Conditionally launch add field continueurl + if (!$dbman->field_exists($table, $field)) { + $dbman->add_field($table, $field); + } + + /// Main savepoint reached + upgrade_main_savepoint($result, 2009111702); + } + return $result; } diff --git a/version.php b/version.php index af1342b7b7..7997aaaf31 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 = 2009111700; // YYYYMMDD = date of the last version bump + $version = 2009111702; // YYYYMMDD = date of the last version bump // XX = daily increments $release = '2.0 dev (Build: 20091117)'; // Human-friendly version name