diff --git a/lib/db/install.xml b/lib/db/install.xml index 2cbd0e94b35..9dbff3d99c7 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -2753,7 +2753,9 @@ - + + + @@ -2874,4 +2876,4 @@ - + \ No newline at end of file diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index f0c8ba1bfef..b85b3785fe6 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -830,5 +830,29 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2012060600.04); } + if ($oldversion < 2012061800.01) { + // Add field newcontextid to backup_files_template + $table = new xmldb_table('backup_files_template'); + $field = new xmldb_field('newcontextid', XMLDB_TYPE_INTEGER, '10', null, null, null, null, 'info'); + + if (!$dbman->field_exists($table, $field)) { + $dbman->add_field($table, $field); + } + + upgrade_main_savepoint(true, 2012061800.01); + } + + if ($oldversion < 2012061800.02) { + // Add field newitemid to backup_files_template + $table = new xmldb_table('backup_files_template'); + $field = new xmldb_field('newitemid', XMLDB_TYPE_INTEGER, '10', null, null, null, null, 'newcontextid'); + + if (!$dbman->field_exists($table, $field)) { + $dbman->add_field($table, $field); + } + + upgrade_main_savepoint(true, 2012061800.02); + } + return true; } diff --git a/version.php b/version.php index 2d8e83a16d2..c4fe5270c3c 100644 --- a/version.php +++ b/version.php @@ -30,7 +30,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2012061800.00; // YYYYMMDD = weekly release date of this DEV branch +$version = 2012061800.02; // YYYYMMDD = weekly release date of this DEV branch // RR = release increments - 00 in DEV branches // .XX = incremental changes