socialforge/db/migrate/20161222063638_create_appli...

15 lines
332 B
Ruby
Raw Normal View History

2016-12-22 15:08:15 +08:00
class CreateAppliedContests < ActiveRecord::Migration
def change
create_table :applied_contests do |t|
t.references :contest
t.references :user
2016-12-22 17:13:10 +08:00
t.string :role
2016-12-22 15:08:15 +08:00
t.integer :status
t.timestamps
end
add_index :applied_contests, :contest_id
add_index :applied_contests, :user_id
end
end