Skip to content

Fix migration type when scheduling DestroyInvalidProjectMembers

Krasimir Angelov requested to merge 349575-fix-migration-type into master

What does this MR do and why?

With !95881 (merged) a new background migration was scheduled in a regular Rails migration. This results in the workers trying to execute the migration job while the job class is not yet available, as teh deployment is not finished.

This MR moves the scheduling migration under db/post_migrate to fix the problem.

See !95881 (comment 1087932448).

There is no immediate issue for gprd as we have a queue of pending migrations, and most likely the deployment will completed by the time any worker tries to execute DestroyInvalidProjectMembers.

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 #349575 (closed)

Merge request reports