20090503121505_populate_member_roles.rb 274 Bytes
Newer Older
1
class PopulateMemberRoles < ActiveRecord::Migration[4.2]
2
  def self.up
3
    MemberRole.delete_all
jplang's avatar
jplang committed
4
    Member.all.each do |member|
5 6 7 8 9 10 11 12
      MemberRole.create!(:member_id => member.id, :role_id => member.role_id)
    end
  end

  def self.down
    MemberRole.delete_all
  end
end