Add batched background migration cleanup guidance
Summary
In !144364 (comment 1916238505) @l.rosa and I were discussing the process for cleaning up old batched background migrations (BBMs).
The process has a few steps:
- Making sure that the BBM was completed in production: https://docs.gitlab.com/ee/development/database/batched_background_migrations.html#monitor-the-progress-and-status-of-a-batched-background-migration
- Making sure that the BBM was finalized: https://docs.gitlab.com/ee/development/database/batched_background_migrations.html#finalize-a-batched-background-migration
- Making sure that the BBM class was not re-used/re-queued by other migration: https://docs.gitlab.com/ee/development/database/batched_background_migrations.html#re-queue-batched-background-migrations
Proposal
This is something that the database team currently take care of, but perhaps could be handled by individual teams who add the BBMs, this would:
- help reduce workload of the database team
- reduce the number of unnecessary migrations hanging around in the repo
This issue is to discuss whether we should add guidance for teams to own this cleanup process for the BBMs they add, which could take the shape of:
- documentation
- issue template for handling the rollout/cleanup, much like the feature flag one