From 2baf81a2436df25c98d4c006daf95e411db58b2c Mon Sep 17 00:00:00 2001 From: David Woloszyn Date: Wed, 25 Sep 2024 14:43:13 +1000 Subject: [PATCH] MDL-83154 AI: Add model field to ai_action_register table --- lib/db/install.xml | 3 ++- lib/db/upgrade.php | 15 +++++++++++++++ version.php | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/lib/db/install.xml b/lib/db/install.xml index b7bd829f0ac..b146f627643 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -4899,6 +4899,7 @@ + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index f040a03a1d7..6c2912a02b6 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -1447,5 +1447,20 @@ function xmldb_main_upgrade($oldversion) { // Automatically generated Moodle v4.5.0 release upgrade line. // Put any upgrade step following this. + if ($oldversion < 2024102500.02) { + + // Define field model to be added to ai_action_register. + $table = new xmldb_table('ai_action_register'); + $field = new xmldb_field('model', XMLDB_TYPE_CHAR, '50', null, null, null, null, null); + + // Conditionally launch add field model. + if (!$dbman->field_exists($table, $field)) { + $dbman->add_field($table, $field); + } + + // Main savepoint reached. + upgrade_main_savepoint(true, 2024102500.02); + } + return true; } diff --git a/version.php b/version.php index c1b67266d40..c3ee0d1915f 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2024102500.00; // YYYYMMDD = weekly release date of this DEV branch. +$version = 2024102500.02; // YYYYMMDD = weekly release date of this DEV branch. // RR = release increments - 00 in DEV branches. // .XX = incremental changes. $release = '5.0dev (Build: 20241025)'; // Human-friendly version name