]> source.dussan.org Git - redmine.git/commitdiff
Database migration from Redmine 0.8.7 or earlier fails (#36766).
authorGo MAEDA <maeda@farend.jp>
Fri, 18 Mar 2022 02:07:14 +0000 (02:07 +0000)
committerGo MAEDA <maeda@farend.jp>
Fri, 18 Mar 2022 02:07:14 +0000 (02:07 +0000)
Patch by Go MAEDA.

git-svn-id: http://svn.redmine.org/redmine/trunk@21461 e93f8b46-1217-0410-a6f0-8f06a7374b81

db/migrate/20090503121505_populate_member_roles.rb

index e5f246afad48263f2998a8faf27c052bfa5b7a6f..75ba261d405c3ab8d57f212a1374632fa2efcb4d 100644 (file)
@@ -2,7 +2,7 @@ class PopulateMemberRoles < ActiveRecord::Migration[4.2]
   def self.up
     MemberRole.delete_all
     Member.all.each do |member|
-      MemberRole.create!(:member_id => member.id, :role_id => member.role_id)
+      MemberRole.insert!({:member_id => member.id, :role_id => member.role_id})
     end
   end