instance method
remove_foreign_key
Ruby on Rails 7.2.3
Since v6.0.6Signature
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)
Parameters
-
argsrest -
optionskeyrest
Source
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 905
def remove_foreign_key(*args, **options)
raise_on_if_exist_options(options)
@base.remove_foreign_key(name, *args, **options)
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb line 905
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::Table