Commit 64c90269 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'mc-add-estimation-time-to-data-migrations-docs' into 'master'

Requires estimated time for data migrations

See merge request gitlab-org/gitlab!18076
parents 742aa6bd 84b919e4
...@@ -95,7 +95,7 @@ and details for a database reviewer: ...@@ -95,7 +95,7 @@ and details for a database reviewer:
- Check queries timing (If any): Queries executed in a migration - Check queries timing (If any): Queries executed in a migration
need to fit comfortably within `15s` - preferably much less than that - on GitLab.com. need to fit comfortably within `15s` - preferably much less than that - on GitLab.com.
- Check [background migrations](background_migrations.md): - Check [background migrations](background_migrations.md):
- Establish a time estimate for execution - Establish a time estimate for execution on GitLab.com.
- They should only be used when migrating data in larger tables. - They should only be used when migrating data in larger tables.
- If a single `update` is below than `1s` the query can be placed - If a single `update` is below than `1s` the query can be placed
directly in a regular migration (inside `db/migrate`). directly in a regular migration (inside `db/migrate`).
...@@ -106,7 +106,11 @@ and details for a database reviewer: ...@@ -106,7 +106,11 @@ and details for a database reviewer:
that post migrations are executed post-deployment in production. that post migrations are executed post-deployment in production.
- Check [timing guidelines for migrations](#timing-guidelines-for-migrations) - Check [timing guidelines for migrations](#timing-guidelines-for-migrations)
- Check migrations are reversible and implement a `#down` method - Check migrations are reversible and implement a `#down` method
- Data migrations should be reversible too or come with a description of how to reverse, when possible. This applies to all types of migrations (regular, post-deploy, background). - Check data migrations:
- Establish a time estimate for execution on GitLab.com.
- Depending on timing, data migrations can be placed on regular, post-deploy or background migrations.
- Data migrations should be reversible too or come with a description of how to reverse, when possible.
This applies to all types of migrations (regular, post-deploy, background).
- Query performance - Query performance
- Check for any obviously complex queries and queries the author specifically - Check for any obviously complex queries and queries the author specifically
points out for review (if any) points out for review (if any)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment