diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-30 15:23:27 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-30 15:23:27 +0300 |
commit | 3bba41a8c5dfcca0d086eaef10ef36a705dd4f7a (patch) | |
tree | 81954681947aaa85592fa7f3c9beed23a7b6bb01 /app/services/users | |
parent | 1aa447601c6be1e964acbb674887649dab23b804 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/users')
-rw-r--r-- | app/services/users/migrate_records_to_ghost_user_service.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/services/users/migrate_records_to_ghost_user_service.rb b/app/services/users/migrate_records_to_ghost_user_service.rb index 06950292fea..bd651a3c45e 100644 --- a/app/services/users/migrate_records_to_ghost_user_service.rb +++ b/app/services/users/migrate_records_to_ghost_user_service.rb @@ -33,6 +33,8 @@ module Users attr_reader :execution_tracker def migrate_records + migrate_user_achievements + return if hard_delete migrate_issues @@ -101,6 +103,11 @@ module Users batched_migrate(Release, :author_id) end + def migrate_user_achievements + batched_migrate(Achievements::UserAchievement, :awarded_by_user_id) + batched_migrate(Achievements::UserAchievement, :revoked_by_user_id) + end + # rubocop:disable CodeReuse/ActiveRecord def batched_migrate(base_scope, column, batch_size: 50) loop do |