demarches-normaliennes/db/migrate/20210107143938_link_user_and_expert.rb
simon lehericey 29e9f2dd32 Ajout du model expert
Co-authored-by: Kara Diaby <kdiaby.pro@gmail.com>
2021-01-20 18:03:05 +01:00

6 lines
162 B
Ruby

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