MDL-88011 core: Fix wrong version bumpings

This commit is contained in:
Huong Nguyen
2026-02-23 15:31:41 +07:00
parent dfeb7c1bf7
commit 04516fbbd4
6 changed files with 23 additions and 26 deletions
+12 -13
View File
@@ -53,19 +53,6 @@ function xmldb_forum_upgrade($oldversion) {
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2025041401) {
// Changing precision of field name on table forum to (1333).
$table = new xmldb_table('forum');
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'type');
// Launch change of precision for field name.
$dbman->change_field_precision($table, $field);
// Forum savepoint reached.
upgrade_mod_savepoint(true, 2025041401, 'forum');
}
// Automatically generated Moodle v5.1.0 release upgrade line.
// Put any upgrade step following this.
@@ -83,5 +70,17 @@ function xmldb_forum_upgrade($oldversion) {
upgrade_mod_savepoint(true, 2025110500, 'forum');
}
if ($oldversion < 2026022300) {
// Changing precision of field name on table forum to (1333).
$table = new xmldb_table('forum');
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'type');
// Launch change of precision for field name.
$dbman->change_field_precision($table, $field);
// Forum savepoint reached.
upgrade_mod_savepoint(true, 2026022300, 'forum');
}
return true;
}
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2025110500; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2026022300; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2025092600; // Requires this Moodle version.
$plugin->component = 'mod_forum'; // Full name of the plugin (used for diagnostics)
+4 -5
View File
@@ -51,8 +51,10 @@ function xmldb_quiz_upgrade($oldversion) {
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2025041401) {
// Automatically generated Moodle v5.1.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2026022300) {
// Changing precision of field name on table quiz to (1333).
$table = new xmldb_table('quiz');
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
@@ -61,11 +63,8 @@ function xmldb_quiz_upgrade($oldversion) {
$dbman->change_field_precision($table, $field);
// Quiz savepoint reached.
upgrade_mod_savepoint(true, 2025041401, 'quiz');
upgrade_mod_savepoint(true, 2026022300, 'quiz');
}
// Automatically generated Moodle v5.1.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2025121300;
$plugin->version = 2026022300;
$plugin->requires = 2025092600;
$plugin->component = 'mod_quiz';
+4 -5
View File
@@ -45,8 +45,10 @@ function xmldb_subsection_upgrade($oldversion) {
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2025041401) {
// Automatically generated Moodle v5.1.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2026022300) {
// Changing precision of field name on table subsection to (1333).
$table = new xmldb_table('subsection');
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
@@ -55,11 +57,8 @@ function xmldb_subsection_upgrade($oldversion) {
$dbman->change_field_precision($table, $field);
// Subsection savepoint reached.
upgrade_mod_savepoint(true, 2025041401, 'subsection');
upgrade_mod_savepoint(true, 2026022300, 'subsection');
}
// Automatically generated Moodle v5.1.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -25,6 +25,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'mod_subsection';
$plugin->version = 2025100602;
$plugin->version = 2026022300;
$plugin->requires = 2025092600;
$plugin->maturity = MATURITY_STABLE;