diff options
Diffstat (limited to 'app/services/users/migrate_to_ghost_user_service.rb')
-rw-r--r-- | app/services/users/migrate_to_ghost_user_service.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/services/users/migrate_to_ghost_user_service.rb b/app/services/users/migrate_to_ghost_user_service.rb index e7186fdfb63..5ca9ed67e56 100644 --- a/app/services/users/migrate_to_ghost_user_service.rb +++ b/app/services/users/migrate_to_ghost_user_service.rb @@ -52,6 +52,7 @@ module Users migrate_notes migrate_abuse_reports migrate_award_emoji + migrate_snippets end # rubocop: disable CodeReuse/ActiveRecord @@ -79,6 +80,11 @@ module Users def migrate_award_emoji user.award_emoji.update_all(user_id: ghost_user.id) end + + def migrate_snippets + snippets = user.snippets.only_project_snippets + snippets.update_all(author_id: ghost_user.id) + end end end |