demarches-normaliennes/db/migrate/20210107143938_link_user_and_expert.rb

7 lines
162 B
Ruby
Raw Normal View History

class LinkUserAndExpert < ActiveRecord::Migration[6.0]
def change
add_reference :users, :expert, index: true
add_foreign_key :users, :experts
end
end