This instance will be upgraded to Heptapod 0.31.0rc on 2022-05-19 at 11:00 UTC+2 (a few minutes of down time)

Commit 9c27c90b authored by Robert Speicher's avatar Robert Speicher
Browse files

Rename AddColumnWithDefault to ReversibleAddColumnWithDefault

We're going to add another cop that deals with another aspect of
`add_column_with_default`, so we need to separate them.
parent 1cc0cf007663
......@@ -5,7 +5,7 @@ module Cop
module Migration
# Cop that checks if `add_column_with_default` is used with `up`/`down` methods
# and not `change`.
class AddColumnWithDefault < RuboCop::Cop::Cop
class ReversibleAddColumnWithDefault < RuboCop::Cop::Cop
include MigrationHelpers
def_node_matcher :add_column_with_default?, <<~PATTERN
......
require_relative 'cop/custom_error_class'
require_relative 'cop/gem_fetcher'
require_relative 'cop/migration/add_column'
require_relative 'cop/migration/add_column_with_default'
require_relative 'cop/migration/add_concurrent_foreign_key'
require_relative 'cop/migration/add_concurrent_index'
require_relative 'cop/migration/add_index'
require_relative 'cop/migration/remove_concurrent_index'
require_relative 'cop/migration/remove_index'
require_relative 'cop/migration/reversible_add_column_with_default'
......@@ -3,9 +3,9 @@
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/migration/add_column_with_default'
require_relative '../../../../rubocop/cop/migration/reversible_add_column_with_default'
describe RuboCop::Cop::Migration::AddColumnWithDefault do
describe RuboCop::Cop::Migration::ReversibleAddColumnWithDefault do
include CopHelper
subject(:cop) { described_class.new }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment