socialforge/db/migrate/20161220090638_create_conte...

15 lines
357 B
Ruby
Raw Normal View History

2016-12-22 10:01:37 +08:00
class CreateContestMembers < ActiveRecord::Migration
def change
create_table :contest_members do |t|
t.references :user
t.references :contest
t.boolean :is_collect
t.boolean :is_current, :default => true
t.timestamps
end
add_index :contest_members, :user_id
add_index :contest_members, :contest_id
end
end