method

add_foreign_key

Importance_0
v6.0.0 - Show latest stable - 0 notes - Class: SchemaStatements
add_foreign_key(from_table, to_table, **options) public

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/connection_adapters/sqlite3/schema_statements.rb, line 55
        def add_foreign_key(from_table, to_table, **options)
          alter_table(from_table) do |definition|
            to_table = strip_table_name_prefix_and_suffix(to_table)
            definition.foreign_key(to_table, options)
          end
        end
Register or log in to add new notes.