-
-
Notifications
You must be signed in to change notification settings - Fork 261
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
Add change_column_null from BulkChangeTable #1280
Comments
ccutrer
added a commit
to ccutrer/rubocop-rails
that referenced
this issue
May 22, 2024
change_column_null is only combinable with PostgreSQL, and is only available as change_null within a change_table block since Rails 6.1, so target to only those cases.
ccutrer
added a commit
to ccutrer/rubocop-rails
that referenced
this issue
May 22, 2024
change_column_null is only combinable with PostgreSQL, and is only available as change_null within a change_table block since Rails 6.1, so target to only those cases.
koic
added a commit
that referenced
this issue
Jun 5, 2024
…change-table [Fix #1280] Handle change_column_null for BulkChangeTable
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
There is a cop BulkChangeTable that checks for combinable alter queries when changing multiple columns.
Sorry if I am mistaken, but I believe that in the past there was no corresponding change_table method for the change_column_null method, and that is how it was removed. #48
But then the change_null method in change_table is added, which corresponds to the change_column_null method.
rails/rails@972d18e
Describe the solution you'd like
I want to check for combinable alter queries and warn if NULL constraint changes are made to multiple columns.
Describe alternatives you've considered
Since there is a method change_null in change_table corresponding to the change_column_null method, how about adding a change check for null constraints to BulkChangeTable?
Additional context
Nothing specifically.
The text was updated successfully, but these errors were encountered: