-
-
Notifications
You must be signed in to change notification settings - Fork 263
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 #1280] Handle change_column_null for BulkChangeTable #1284
[Fix #1280] Handle change_column_null for BulkChangeTable #1284
Conversation
@@ -113,8 +113,10 @@ class BulkChangeTable < Base | |||
MYSQL_COMBINABLE_ALTER_METHODS = %i[rename_column add_index remove_index].freeze | |||
|
|||
POSTGRESQL_COMBINABLE_TRANSFORMATIONS = %i[change_default].freeze | |||
POSTGRESQL_COMBINABLE_TRANSFORMATIONS_6_1_PLUS = %i[change_null].freeze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the name to something like the following?
POSTGRESQL_COMBINABLE_TRANSFORMATIONS_6_1_PLUS = %i[change_null].freeze | |
POSTGRESQL_COMBINABLE_TRANSFORMATIONS_SINCE_6_1 = %i[change_null].freeze |
|
||
POSTGRESQL_COMBINABLE_ALTER_METHODS = %i[change_column_default].freeze | ||
POSTGRESQL_COMBINABLE_ALTER_METHODS_6_1_PLUS = %i[change_column_null].freeze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
POSTGRESQL_COMBINABLE_ALTER_METHODS_6_1_PLUS = %i[change_column_null].freeze | |
POSTGRESQL_COMBINABLE_ALTER_METHODS_SINCE_6_1 = %i[change_column_null].freeze |
@ccutrer ping |
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.
Constants renamed |
It hasn't been renamed. Perhaps it was forgotten to be git pushed? |
7b4ccc6
to
e71b373
Compare
🤦, no, I just accidentally pushed to my |
change_column_null
is only combinable with PostgreSQL, and is only available aschange_null
within achange_table
block since Rails 6.1, so target to only those cases.Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).bundle exec rake default
. It executes all tests and runs RuboCop on its own code.{change_type}_{change_description}.md
if the new code introduces user-observable changes. See changelog entry format for details.