Skip to content

Commit

Permalink
MDL-83153 core: Set ai_action_register.success as INT(1)
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Sep 16, 2024
1 parent 09e56f2 commit 47c10f3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/db/install.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="lib/db" VERSION="20240912" COMMENT="XMLDB file for core Moodle tables"
<XMLDB PATH="lib/db" VERSION="20240916" COMMENT="XMLDB file for core Moodle tables"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../lib/xmldb/xmldb.xsd"
>
Expand Down Expand Up @@ -4891,7 +4891,7 @@
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
<FIELD NAME="actionname" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" COMMENT="Name of the action"/>
<FIELD NAME="actionid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="ID in related action table with more details about the action"/>
<FIELD NAME="success" TYPE="binary" NOTNULL="true" SEQUENCE="false" COMMENT="Was the action successful when run"/>
<FIELD NAME="success" TYPE="int" LENGTH="1" NOTNULL="true" SEQUENCE="false" COMMENT="Was the action successful when run"/>
<FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="The user who made the request to run the action"/>
<FIELD NAME="contextid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="The id of the context the action request was made in"/>
<FIELD NAME="provider" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" COMMENT="The provider plugin name that processed the action"/>
Expand Down
13 changes: 13 additions & 0 deletions lib/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -1365,5 +1365,18 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2024091000.01);
}

if ($oldversion < 2024091600.00) {

// Changing type of field success on table ai_action_register to int.
$table = new xmldb_table('ai_action_register');
$field = new xmldb_field('success', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, null, 'actionid');

// Launch change of type for field success.
$dbman->change_field_type($table, $field);

// Main savepoint reached.
upgrade_main_savepoint(true, 2024091600.00);
}

return true;
}
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

defined('MOODLE_INTERNAL') || die();

$version = 2024091300.00; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2024091600.00; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
$release = '4.5dev+ (Build: 20240913)'; // Human-friendly version name
Expand Down

0 comments on commit 47c10f3

Please sign in to comment.