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
|