socialforge/db/migrate/20161220090638_create_conte...

14 lines
329 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
2016-12-22 11:17:13 +08:00
t.boolean :is_collect, :default => true
2016-12-22 10:01:37 +08:00
t.timestamps
end
add_index :contest_members, :user_id
add_index :contest_members, :contest_id
end
end