-
-
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
Please remove Rails/UnusedIgnoredColumns
#1249
Comments
@pocke did you find any case where you can safely know a column was already removed in production that made you implement this cop? As far as I know, checking |
Earlopain
added a commit
to Earlopain/rubocop-rails
that referenced
this issue
Mar 15, 2024
9 tasks
Earlopain
added a commit
to Earlopain/rubocop-rails
that referenced
this issue
Mar 15, 2024
Earlopain
added a commit
to Earlopain/rubocop-rails
that referenced
this issue
Mar 20, 2024
koic
added a commit
that referenced
this issue
Mar 31, 2024
[Fix #1249] Disable `Rails/UnusedIgnoredColumns` by default
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.
This cop was added in #494.
While the idea is good in practice it doesn't work. You should only delete the
ignore_column
when that column is removed from the production database, but if you have that cop enabled, it is using the development information to tell you that the column was already removed, which at that point you have no way to know yet.This will cause the same pull request that removes the column from the database, to also remove it from the
ignore_column
list, negating the reason why you need to useignore_column
, and potentially causing downtime for systems.Describe the solution you'd like
I don't see how to implement this cop is a way that would actually work since you need to have access to the production database schema to tell if a column was already removed or not, so I think this cop should be deprecated and removed.
The text was updated successfully, but these errors were encountered: