summaryrefslogtreecommitdiffstats
path: root/db/migrate/20090503121505_populate_member_roles.rb
blob: 8b7c987501d135e4598ba69fa8efd3ec04a08eae (plain)
1
2
3
4
5
6
7
8
9
10
11
class PopulateMemberRoles < ActiveRecord::Migration
  def self.up
    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