Skip to content

Add migration to fix broken user achievement records

What does this MR do and why?

Migrate fields of UserAchievement to Ghost User on User deletion

This fixes currently broken records by migrating them to the Ghost user manually.

Screenshots or screen recordings

No UI changes.

How to set up and validate locally

  1. Have a user achievement record with a revoked_at non nil and revoked_by_user_id nil
  2. Migrate the database
  3. Verify that revoked_by_user_id is now equal to the id of the ghost user

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #425218 (closed)

Edited by Niklas van Schrick

Merge request reports

Loading