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

change_column_null should not be included in BulkChangeTable cop #43

Closed
md5 opened this issue Feb 26, 2019 · 0 comments
Closed

change_column_null should not be included in BulkChangeTable cop #43

md5 opened this issue Feb 26, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@md5
Copy link

md5 commented Feb 26, 2019

As it stands now, the BulkChangeTable cop flags uses of change_column_null. However, there is no corresponding method on ActiveRecord::ConnectionAdapters::Table to replace it with as there is with change_column_default and Table#change_default. The closest thing is Table#change, but that requires the developer to repeat the entire column definition (which is why change_column_null exists in the first place in addition to change_column).

Am I missing a reasonable replacement for change_column_null?

@Drenmi Drenmi added the enhancement New feature or request label Feb 27, 2019
anthony-robin pushed a commit to anthony-robin/rubocop-rails that referenced this issue Apr 20, 2019
The `change_column_null` method does not have corresponding method to
use in the suggested `change_table` version.

We should remove it from the offended methods list.
anthony-robin pushed a commit to anthony-robin/rubocop-rails that referenced this issue Jun 11, 2019
The `change_column_null` method does not have corresponding method to
use in the suggested `change_table` version.

We should remove it from the offended methods list.
anthony-robin pushed a commit to anthony-robin/rubocop-rails that referenced this issue Jun 11, 2019
The `change_column_null` method does not have corresponding method to
use in the suggested `change_table` version.

We should remove it from the offended methods list.
@koic koic closed this as completed in 8fa626d Jun 11, 2019
koic added a commit that referenced this issue Jun 11, 2019
…rom_bulk_change_table

[Fix #43] Remove `change_column_null` from `BulkChangeTable`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants