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:
parent
88532b6817
commit
bbb5a47b2a
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue