Skip to content

Commit 4c30777

Browse files
author
root
committed
Fix protected branches migration
1 parent 6ea001f commit 4c30777

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: db/migrate/20150823030100_migrate_protected_branches_users.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ class MigrateProtectedBranchesUsers < ActiveRecord::Migration
77
def self.up
88
RepositoryProtectedBrancheWrapped.all.each do |protected_branch|
99
users = protected_branch.user_list.map { |u| User.find_by_login(u) }.compact.uniq
10-
protected_branch.user_ids = users.map(&:id)
10+
manager = RepositoryProtectedBranches::MemberManager.new(protected_branch)
11+
manager.add_users(users.map(&:id))
1112
end
1213
remove_column :repository_protected_branches, :user_list
1314
end

0 commit comments

Comments
 (0)