diff --git a/admin/tool/recyclebin/db/install.xml b/admin/tool/recyclebin/db/install.xml index 8aa6c9d45b8..2a16ee56ee5 100644 --- a/admin/tool/recyclebin/db/install.xml +++ b/admin/tool/recyclebin/db/install.xml @@ -1,5 +1,5 @@ - @@ -10,7 +10,7 @@ - + @@ -25,7 +25,7 @@ - + diff --git a/admin/tool/recyclebin/db/upgrade.php b/admin/tool/recyclebin/db/upgrade.php index 4500ce60923..d834688535f 100644 --- a/admin/tool/recyclebin/db/upgrade.php +++ b/admin/tool/recyclebin/db/upgrade.php @@ -45,21 +45,36 @@ function xmldb_tool_recyclebin_upgrade($oldversion) { // Automatically generated Moodle v4.5.0 release upgrade line. // Put any upgrade step following this. - if ($oldversion < 2024111500) { - // Changing precision of field fullname on table tool_recyclebin_category to (255). + // Automatically generated Moodle v5.0.0 release upgrade line. + // Put any upgrade step following this. + + if ($oldversion < 2025041401) { + + // Changing precision of field shortname on table tool_recyclebin_category to (1333). + $table = new xmldb_table('tool_recyclebin_category'); + $field = new xmldb_field('shortname', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'categoryid'); + + // Launch change of precision for field shortname. + $dbman->change_field_precision($table, $field); + + // Changing precision of field fullname on table tool_recyclebin_category to (1333). $table = new xmldb_table('tool_recyclebin_category'); $field = new xmldb_field('fullname', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'shortname'); // Launch change of precision for field fullname. $dbman->change_field_precision($table, $field); - // Recyclebin savepoint reached. - upgrade_plugin_savepoint(true, 2024111500, 'tool', 'recyclebin'); - } + // Changing precision of field name on table tool_recyclebin_course to (1333). + $table = new xmldb_table('tool_recyclebin_course'); + $field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, null, null, null, 'module'); - // Automatically generated Moodle v5.0.0 release upgrade line. - // Put any upgrade step following this. + // Launch change of precision for field name. + $dbman->change_field_precision($table, $field); + + // Recyclebin savepoint reached. + upgrade_plugin_savepoint(true, 2025041401, 'tool', 'recyclebin'); + } return true; } diff --git a/admin/tool/recyclebin/version.php b/admin/tool/recyclebin/version.php index ac47303254a..cfc2d10c22a 100644 --- a/admin/tool/recyclebin/version.php +++ b/admin/tool/recyclebin/version.php @@ -24,6 +24,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2025041400; // The current plugin version (Date: YYYYMMDDXX). +$plugin->version = 2025041401; // The current plugin version (Date: YYYYMMDDXX). $plugin->requires = 2025040800; // Requires this Moodle version. $plugin->component = 'tool_recyclebin'; // Full name of the plugin (used for diagnostics).