1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/db/migrate/20190603150642_create_statistic_profile.rb

14 lines
462 B
Ruby
Raw Normal View History

2019-06-03 17:25:04 +02:00
class CreateStatisticProfile < ActiveRecord::Migration
def change
create_table :statistic_profiles do |t|
t.boolean :gender
t.date :birthday
t.belongs_to :group, index: true, foreign_key: true
t.belongs_to :user, index: true, foreign_key: true
end
add_reference :reservations, :statistic_profile, index: true, foreign_key: true
add_reference :subscriptions, :statistic_profile, index: true, foreign_key: true
2019-06-03 17:25:04 +02:00
end
end