2009-05-10 14:54:31 +04:00
|
|
|
class PopulateMemberRoles < ActiveRecord::Migration
|
|
|
|
def self.up
|
2009-05-10 15:18:09 +04:00
|
|
|
MemberRole.delete_all
|
2012-12-03 00:28:37 +04:00
|
|
|
Member.all.each do |member|
|
2009-05-10 14:54:31 +04:00
|
|
|
MemberRole.create!(:member_id => member.id, :role_id => member.role_id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
|
|
|
MemberRole.delete_all
|
|
|
|
end
|
|
|
|
end
|