Skip to content

Commit

Permalink
Merge pull request #574 from ncstate-delta/fix/registration-field-nul…
Browse files Browse the repository at this point in the history
…l-values

upgrade: set null registration values to new default before alter
  • Loading branch information
jrchamp authored Feb 15, 2024
2 parents 66fefba + 2338ab7 commit b3a1e3a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit b3a1e3a

Please sign in to comment.