Ajout du model expert

Co-authored-by: Kara Diaby <kdiaby.pro@gmail.com>
This commit is contained in:
simon lehericey 2021-01-07 15:45:02 +01:00 committed by kara Diaby
parent f698dc798c
commit 29e9f2dd32
5 changed files with 35 additions and 1 deletions

View file

@ -0,0 +1,7 @@
class CreateExperts < ActiveRecord::Migration[6.0]
def change
create_table :experts do |t| # rubocop:disable Style/SymbolProc
t.timestamps
end
end
end

View file

@ -0,0 +1,6 @@
class LinkUserAndExpert < ActiveRecord::Migration[6.0]
def change
add_reference :users, :expert, index: true
add_foreign_key :users, :experts
end
end