15 lines
357 B
Ruby
15 lines
357 B
Ruby
|
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
|