MDL-83985 tool_recyclebin: change module names to 1333 chars
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="admin/tool/recyclebin/db" VERSION="20241115" COMMENT="XMLDB file for Moodle tool/recyclebin"
|
||||
<XMLDB PATH="admin/tool/recyclebin/db" VERSION="20250414" COMMENT="XMLDB file for Moodle tool/recyclebin"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -10,7 +10,7 @@
|
||||
<FIELD NAME="courseid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="section" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="module" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="false" SEQUENCE="false"/>
|
||||
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
</FIELDS>
|
||||
<KEYS>
|
||||
@@ -25,7 +25,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="categoryid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="shortname" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="shortname" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="fullname" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
|
||||
</FIELDS>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user