instance method remove_foreign_key

Ruby on Rails 6.0.6

Since v6.0.6

Available in: v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

remove_foreign_key(*args, **options)

Removes the given foreign key from the table.

t.remove_foreign_key(:authors)
t.remove_foreign_key(column: :author_id)

See connection.remove_foreign_key

Parameters

args rest
options keyrest
Source
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 704
      def remove_foreign_key(*args, **options)
        @base.remove_foreign_key(name, *args, **options)
      end

Defined in activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb line 704 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::ConnectionAdapters::Table

Type at least 2 characters to search.

↑↓ navigate · open · esc close