socialforge/db/migrate/20161221070253_create_conte...

19 lines
545 B
Ruby

class CreateContestantWorkProjects < ActiveRecord::Migration
def change
create_table :contestant_work_projects do |t|
t.references :contest
t.references :work
t.references :contestant_work
t.references :project
t.references :user
t.boolean :is_leader
t.timestamps
end
add_index :contestant_work_projects, :contest_id
add_index :contestant_work_projects, :work_id
add_index :contestant_work_projects, :contestant_work_id
add_index :contestant_work_projects, :user_id
end
end