From 0dbeb9748b5667900dbe194923b81dc5de212f1e Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Mon, 26 Oct 2020 10:48:53 +0100 Subject: [PATCH] MDL-70010 core: reconcile MOODLE_310_STABLE and master There are some unexpected differences between 310 and master, better reconcile them now. Note this is not 100% critical but, as far as nothing exclusively for 4.0 has landed to master yet only branch/version differences should exist. --- lib/db/upgrade.php | 30 ++++++++++++------------- lib/phpunit/classes/phpunit_dataset.php | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index b9c5d342359..f858fe32e6b 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -2543,21 +2543,6 @@ function xmldb_main_upgrade($oldversion) { } if ($oldversion < 2021052500.01) { - - // Define field timecreated to be added to task_adhoc. - $table = new xmldb_table('task_adhoc'); - $field = new xmldb_field('timecreated', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'blocking'); - - // Conditionally launch add field timecreated. - if (!$dbman->field_exists($table, $field)) { - $dbman->add_field($table, $field); - } - - // Main savepoint reached. - upgrade_main_savepoint(true, 2021052500.01); - } - - if ($oldversion < 2021052500.02) { // Delete all user evidence files from users that have been deleted. $sql = "SELECT DISTINCT f.* FROM {files} f @@ -2572,6 +2557,21 @@ function xmldb_main_upgrade($oldversion) { $fs->get_file_instance($stalefile)->delete(); } + upgrade_main_savepoint(true, 2021052500.01); + } + + if ($oldversion < 2021052500.02) { + + // Define field timecreated to be added to task_adhoc. + $table = new xmldb_table('task_adhoc'); + $field = new xmldb_field('timecreated', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'blocking'); + + // Conditionally launch add field timecreated. + if (!$dbman->field_exists($table, $field)) { + $dbman->add_field($table, $field); + } + + // Main savepoint reached. upgrade_main_savepoint(true, 2021052500.02); } diff --git a/lib/phpunit/classes/phpunit_dataset.php b/lib/phpunit/classes/phpunit_dataset.php index 28a4b3bc062..fbb8a3cd9f4 100644 --- a/lib/phpunit/classes/phpunit_dataset.php +++ b/lib/phpunit/classes/phpunit_dataset.php @@ -98,7 +98,7 @@ class phpunit_dataset { * * @param string $content contents (CSV or XML) to load. * @param string $type format of the content to be loaded (csv or xml). - * @param string $table|null name of the table which the file belongs to (only for CSV files). + * @param string|null $table name of the table which the file belongs to (only for CSV files). */ public function from_string(string $content, string $type, ?string $table = null): void { switch ($type) { -- 2.43.0