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
|
2009-05-10 14:54:31 +04:00
|
|
|
Member.find(:all).each do |member|
|
|
|
|
MemberRole.create!(:member_id => member.id, :role_id => member.role_id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
|
|
|
MemberRole.delete_all
|
|
|
|
end
|
|
|
|
end
|