Flowdock
method

invert_remove_index

Importance_0
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: CommandRecorder
invert_remove_index(args) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/migration/command_recorder.rb, line 202
        def invert_remove_index(args)
          options = args.extract_options!
          table, columns = args

          columns ||= options.delete(:column)

          unless columns
            raise ActiveRecord::IrreversibleMigration, "remove_index is only reversible if given a :column option."
          end

          options.delete(:if_exists)

          args = [table, columns]
          args << options unless options.empty?

          [:add_index, args]
        end
Register or log in to add new notes.