2016-12-22 10:01:37 +08:00
|
|
|
class CreateContestMemberRoles < ActiveRecord::Migration
|
|
|
|
def change
|
|
|
|
create_table :contest_member_roles do |t|
|
|
|
|
t.references :contest_member
|
|
|
|
t.references :role
|
2016-12-22 11:17:13 +08:00
|
|
|
t.boolean :is_current, :default => true
|
2016-12-22 10:01:37 +08:00
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
add_index :contest_member_roles, :contest_member_id
|
|
|
|
add_index :contest_member_roles, :role_id
|
|
|
|
end
|
|
|
|
end
|