summaryrefslogtreecommitdiff
path: root/rubocop/cop/migration/add_concurrent_foreign_key.rb
diff options
context:
space:
mode:
Diffstat (limited to 'rubocop/cop/migration/add_concurrent_foreign_key.rb')
-rw-r--r--rubocop/cop/migration/add_concurrent_foreign_key.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/rubocop/cop/migration/add_concurrent_foreign_key.rb b/rubocop/cop/migration/add_concurrent_foreign_key.rb
index ebab6aa653e..f538207d336 100644
--- a/rubocop/cop/migration/add_concurrent_foreign_key.rb
+++ b/rubocop/cop/migration/add_concurrent_foreign_key.rb
@@ -7,7 +7,7 @@ module RuboCop
module Migration
# Cop that checks if `add_concurrent_foreign_key` is used instead of
# `add_foreign_key`.
- class AddConcurrentForeignKey < RuboCop::Cop::Cop
+ class AddConcurrentForeignKey < RuboCop::Cop::Base
include MigrationHelpers
MSG = '`add_foreign_key` requires downtime, use `add_concurrent_foreign_key` instead'
@@ -29,7 +29,7 @@ module RuboCop
return if in_with_lock_retries?(node)
return if not_valid_fk?(node)
- add_offense(node, location: :selector)
+ add_offense(node.loc.selector)
end
def method_name(node)