diff --git a/lib/db/install.xml b/lib/db/install.xml index 97b8b1396eb..a97d2e7375c 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -2648,8 +2648,10 @@ - - + + + + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 5aecc565613..64776d700bf 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -4859,6 +4859,28 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL"); upgrade_main_savepoint(true, 2010070501); } + if ($oldversion < 2010070502) { + + /// Define field newitemid to be added to backup_ids_template + $table = new xmldb_table('backup_ids_template'); + $field = new xmldb_field('newitemid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', 'itemid'); + /// Conditionally launch add field newitemid + if (!$dbman->field_exists($table, $field)) { + $dbman->add_field($table, $field); + } + + /// Define field info to be added to backup_ids_template + $table = new xmldb_table('backup_ids_template'); + $field = new xmldb_field('info', XMLDB_TYPE_TEXT, 'medium', null, null, null, null, 'parentitemid'); + /// Conditionally launch add field info + if (!$dbman->field_exists($table, $field)) { + $dbman->add_field($table, $field); + } + + /// Main savepoint reached + upgrade_main_savepoint(true, 2010070502); + } + return true; } diff --git a/version.php b/version.php index dfe5b56d8b9..762f5fffc34 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 = 2010070501; // YYYYMMDD = date of the last version bump + $version = 2010070502; // YYYYMMDD = date of the last version bump // XX = daily increments $release = '2.0 Preview 4 (Build: 20100705)'; // Human-friendly version name