socialforge/db/migrate/20161220093609_create_conte...

13 lines
320 B
Ruby

class CreateContestantForContests < ActiveRecord::Migration
def change
create_table :contestant_for_contests do |t|
t.integer :student_id
t.references :contest
t.timestamps
end
add_index :contestant_for_contests, :contest_id
add_index :contestant_for_contests, :student_id
end
end