socialforge/db/migrate/20090503121505_populate_mem...

13 lines
269 B
Ruby
Raw Normal View History

2013-08-01 10:33:49 +08:00
class PopulateMemberRoles < ActiveRecord::Migration
def self.up
MemberRole.delete_all
Member.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