DB docs: improve guidance around which migration type to use
The following discussion from !65250 (merged) should be addressed:
-
@mkaeppler started a discussion: (+9 comments) We might have to take this out of this migration. I triggered the job that estimates timing of this migration in production to inform this.
Some very good info in the thread above around how to make these decisions. I think we should fold that into our Migration Style Guidlines to help developers make better decisions before a database review is requested. My general idea is:
- Update migration style docs with a paragraph about "How to choose the migration type"
- Link to that section from this automated comment and rephrase to "may have to be a post-deploy or background migration"
- Make sure the timing guidance is consistent with docs (you mention 20m but in the docs it says 10?)
- Move Timing Guidance out of the Database Review guidelines and into the Migration Style Guide. First and foremost we want developers to be conscious of this and adhere to it, not just reviewers: https://docs.gitlab.com/ee/development/database_review.html#timing-guidelines-for-migrations