From 2338ab7896fde91912577a5f7e23cb2e12d9b7b5 Mon Sep 17 00:00:00 2001 From: Jonathan Champ Date: Fri, 2 Feb 2024 16:40:23 -0500 Subject: [PATCH] upgrade: set null registration values to new default before alter --- db/upgrade.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/db/upgrade.php b/db/upgrade.php index 9ade8467..662e3678 100755 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -938,6 +938,9 @@ function xmldb_zoom_upgrade($oldversion) { $table = new xmldb_table('zoom'); $field = new xmldb_field('registration', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '2', 'option_auto_recording'); + // Set any null values to the new default: 2. + $DB->set_field_select('zoom', 'registration', '2', 'registration IS NULL'); + // Launch change of nullability for field registration. $dbman->change_field_notnull($table, $field);