From 1862595581efaeea2d531ae388fe5f4ddaba1afb Mon Sep 17 00:00:00 2001 From: John Lane <46030891+JohnOLane@users.noreply.github.com> Date: Thu, 11 Jul 2024 09:47:36 -0600 Subject: [PATCH] Making mdl_scheduler_appointment.studentattend nullable. --- db/install.xml | 6 +++--- db/upgrade.php | 13 +++++++++++++ version.php | 2 +- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/db/install.xml b/db/install.xml index fbc59aa5..1a8e00dc 100644 --- a/db/install.xml +++ b/db/install.xml @@ -1,5 +1,5 @@ - @@ -65,7 +65,7 @@ - + @@ -85,4 +85,4 @@ - \ No newline at end of file + diff --git a/db/upgrade.php b/db/upgrade.php index e3dfc6c5..5c4d62e7 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -401,5 +401,18 @@ function xmldb_scheduler_upgrade($oldversion=0) { upgrade_mod_savepoint(true, 2022120200, 'scheduler'); } + if ($oldversion < 2023052401) { + + // Changing nullability of field studentattend on table scheduler_appointment to null. + $table = new xmldb_table('scheduler_appointment'); + $field = new xmldb_field('studentattend', XMLDB_TYPE_INTEGER, '4', null, false, null, null, 'attended'); + + // Launch change of nullability for field studentattend. + $dbman->change_field_notnull($table, $field); + + // Scheduler savepoint reached. + upgrade_mod_savepoint(true, 2023052401, 'scheduler'); + } + return true; } diff --git a/version.php b/version.php index d1b81a41..f4723913 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ */ $plugin->component = 'mod_scheduler'; // Full name of the plugin (used for diagnostics). -$plugin->version = 2023052400; // The current module version (Date: YYYYMMDDXX). +$plugin->version = 2023052401; // The current module version (Date: YYYYMMDDXX). $plugin->release = '4.x dev'; // Human-friendly version name. $plugin->requires = 2022041900; // Requires Moodle 4.0. $plugin->maturity = MATURITY_ALPHA; // Development release - not for production use.