MDL-84049 badges: Remove default apiversion value

Remove the default value for the apiversion field in the
badge_external_backpack table.
This commit is contained in:
Sara Arjona
2025-01-24 07:05:11 +01:00
parent bcf06a0484
commit 33135d96ca
3 changed files with 12 additions and 2 deletions
Regular → Executable
+1 -1
View File
@@ -3404,7 +3404,7 @@
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
<FIELD NAME="backpackapiurl" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="backpackweburl" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="apiversion" TYPE="char" LENGTH="12" NOTNULL="true" DEFAULT="1.0" SEQUENCE="false"/>
<FIELD NAME="apiversion" TYPE="char" LENGTH="12" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="sortorder" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="oauth2_issuerid" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false" COMMENT="OAuth 2 Issuer"/>
</FIELDS>
+10
View File
@@ -1382,5 +1382,15 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2025011700.02);
}
if ($oldversion < 2025012400.01) {
// Remove the default value for the apiversion field.
$table = new xmldb_table('badge_external_backpack');
$apiversionfield = new xmldb_field('apiversion', XMLDB_TYPE_CHAR, '12', null, XMLDB_NOTNULL, null, null);
$dbman->change_field_default($table, $apiversionfield);
// Main savepoint reached.
upgrade_main_savepoint(true, 2025012400.01);
}
return true;
}
+1 -1
View File
@@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2025012400.00; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2025012400.01; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
$release = '5.0dev (Build: 20250124)'; // Human-friendly version name