clarion/db/migrate/20150729135346_create_participations.rb
Petko Bordjukov 9ca34c5a22 Introduce a Participation model
This model is responsible for the 1..n - 1..n relationship between an
event and the people that will participate in it.
2015-07-31 14:40:04 +03:00

12 lines
320 B
Ruby

class CreateParticipations < ActiveRecord::Migration
def change
create_table :participations do |t|
t.references :participant, index: true, foreign_key: true
t.references :event, index: true, foreign_key: true
t.boolean :approved, default: false
t.timestamps null: false
end
end
end