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

upgrade: set null registration values to new default before alter #574

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

jrchamp
Copy link
Collaborator

@jrchamp jrchamp commented Feb 2, 2024

Although the XMLDB Editor provides helpful PHP code to update fields, the underlying functions do not automatically make sure to set the NULL values to the new default value when switching the nullability of the field.

Here's a similar example from Moodle core: https://github.com/moodle/moodle/blame/3fc907e3d8646d53b744cbeb2820f5a060cc86ee/lib/db/upgrade.php#L816-L821

Fixes #573

@jrchamp jrchamp added the bug Fixes problems or reduces technical debt label Feb 2, 2024
@jrchamp jrchamp requested a review from a team February 2, 2024 21:47
@jrchamp jrchamp self-assigned this Feb 2, 2024
@jrchamp
Copy link
Collaborator Author

jrchamp commented Feb 13, 2024

Thanks @smbader for agreeing to review

@smbader
Copy link
Contributor

smbader commented Feb 14, 2024

I performed an upgrade to 2024012500 on several Zoom instances with varying registration values including null.

The column was converted to not null and all null values were changed to 2.

Success.

Copy link
Contributor

@smbader smbader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested!

@jrchamp jrchamp merged commit b3a1e3a into main Feb 15, 2024
14 checks passed
@jrchamp jrchamp deleted the fix/registration-field-null-values branch February 15, 2024 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes problems or reduces technical debt
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Bug: Zoom plugin upgrade failure: DDL sql execution error
2 participants