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

Fix one step invite migration to run in one line adding default false and not null instead of two #4091

Merged

Conversation

vincent-truong-main
Copy link
Contributor

@vincent-truong-main vincent-truong-main commented Feb 8, 2024

Best reviewed with Hide Whitespace on

Description

While running the migration from #4075, we encountered an issue where null values where detected. This is because the column was added in two lines, first default then setting not null. This allowed some null values to slip in.

This PR changes migration to run one on line adding both default and non null inside safety assured block.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Ran migrations locally with no error.

Screenshots

Comment on lines +5 to +15
# id :integer not null, primary key
# city :string
# deadline_day :integer
# default_storage_location :integer
# distribute_monthly :boolean default(FALSE), not null
# email :string
# enable_child_based_requests :boolean default(TRUE), not null
# enable_individual_requests :boolean default(TRUE), not null
# enable_quantity_based_requests :boolean default(TRUE), not null
# intake_location :integer
# invitation_text :text
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some automatic reorganization

@dorner dorner merged commit 6312a8a into rubyforgood:main Feb 8, 2024
11 checks passed
@dorner
Copy link
Collaborator

dorner commented Feb 8, 2024

Thanks for the fix!

Copy link
Contributor

@vincent-truong-dev: Your PR Fix one step invite migration to run in one line adding default false and not null instead of two is part of today's Human Essentials production release: 2024.02.11.
Thank you very much for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants