instance method
foreign_key
Ruby on Rails 7.0.10
Since v7.0.10Signature
foreign_key(to_table, **options)
No documentation comment.
Parameters
-
to_tablereq -
optionskeyrest
Source
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 439
def foreign_key(to_table, **options)
foreign_keys << new_foreign_key_definition(to_table, options)
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb line 439
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::TableDefinition