Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db: revert registration upgrade; fix tables that upgraded #565

Merged
merged 2 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ function xmldb_zoom_upgrade($oldversion) {
$table = new xmldb_table('zoom');

// Define and conditionally add field registration.
$field = new xmldb_field('registration', XMLDB_TYPE_INTEGER, '1', null, null, null, null, 'option_auto_recording');
$field = new xmldb_field('registration', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '2', 'option_auto_recording');
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
Expand Down Expand Up @@ -933,5 +933,20 @@ function xmldb_zoom_upgrade($oldversion) {
upgrade_mod_savepoint(true, 2023111600, 'zoom');
}

if ($oldversion < 2024012500) {
// Version 5.1.0 incorrectly upgraded the zoom table's registration field. It should not be null and should default to 2.
$table = new xmldb_table('zoom');
$field = new xmldb_field('registration', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '2', 'option_auto_recording');

// Launch change of nullability for field registration.
$dbman->change_field_notnull($table, $field);

// Launch change of default for field registration.
$dbman->change_field_default($table, $field);

// Zoom savepoint reached.
upgrade_mod_savepoint(true, 2024012500, 'zoom');
}

return true;
}
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'mod_zoom';
$plugin->version = 2023121400;
$plugin->version = 2024012500;
$plugin->release = 'v5.1.4';
$plugin->requires = 2019052000;
$plugin->maturity = MATURITY_STABLE;
Expand Down
Loading