Clear member_roles table before populating it.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2729 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2009-05-10 11:18:09 +00:00
parent 88532b6817
commit bbb5a47b2a
1 changed files with 1 additions and 0 deletions

View File

@ -1,5 +1,6 @@
class PopulateMemberRoles < ActiveRecord::Migration class PopulateMemberRoles < ActiveRecord::Migration
def self.up def self.up
MemberRole.delete_all
Member.find(:all).each do |member| Member.find(:all).each do |member|
MemberRole.create!(:member_id => member.id, :role_id => member.role_id) MemberRole.create!(:member_id => member.id, :role_id => member.role_id)
end end