Skip to content

Guard against dropped columns when finalizing user details migration

Stan Hu requested to merge sh-guard-backfill-migration into master

What does this MR do and why?

!113152 (merged) was added to properly finalize a batched background migration added in !109019 (merged).

However, if the 20230116160904 migration (RemoveUserDetailsFieldsFromUser) already ran, finalizing this background migration will fail since the migration expects users.linkedin and other columns to exist.

To prevent this failure, we should verify the column still exists before attempting to finalize the migration. If the column has already been dropped, the batched migration will be left in a failed state.

Relates to #393216 (closed)

MR acceptance checklist

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

Edited by Stan Hu

Merge request reports