polyglot/db/migrate/20180827151325_create_conne...

9 lines
256 B
Ruby
Raw Normal View History

class CreateConnections < ActiveRecord::Migration[5.2]
def change
create_table :connections do |t|
t.references :user, foreign_key: true, index: true
t.references :contact, foreign_key: { to_table: :users }, index: true
end
end
end