-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
New cop rule: IrreversibleMigration
#43
New cop rule: IrreversibleMigration
#43
Conversation
@@ -17,5 +17,5 @@ Gem::Specification.new do |gem| | |||
|
|||
gem.required_ruby_version = '>= 2.5' | |||
|
|||
gem.add_runtime_dependency 'rubocop', '~> 1.0' | |||
gem.add_dependency 'rubocop', '~> 1.0' |
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.
Had to make this change due to failed CI build
This introduced an issue where |
The
|
@soumyaray Thanks for bringing this to my attention, the cop should be ignoring all methods within a |
Thank you so much for your quick handling of this -- really appreciate the work on this gem. |
Should resolve this issue: #30
According to the Sequel documentation, only certain methods should be placed inside a
change
block in a migration file. Other methods could make the migration irreversible.This new cop will warn the user under the following conditions inside a
change
block:#add_primary_key
with an array argument instead of a symbol