view db/migrate/.svn/text-base/20090503121505_populate_member_roles.rb.svn-base @ 881:fade849e02c5 feature_73

Close obsolete branch feature_73
author Chris Cannam
date Fri, 25 Mar 2011 15:48:36 +0000
parents 513646585e45
children
line wrap: on
line source
class PopulateMemberRoles < ActiveRecord::Migration
  def self.up
    MemberRole.delete_all
    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