Flowdock
method

invert_remove_foreign_key

Importance_0
v5.1.7 - Show latest stable - 0 notes - Class: CommandRecorder
invert_remove_foreign_key(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 218
        def invert_remove_foreign_key(args)
          from_table, to_table, remove_options = args
          raise ActiveRecord::IrreversibleMigration, "remove_foreign_key is only reversible if given a second table" if to_table.nil? || to_table.is_a?(Hash)

          reversed_args = [from_table, to_table]
          reversed_args << remove_options if remove_options

          [:add_foreign_key, reversed_args]
        end
Register or log in to add new notes.