diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-27 09:06:26 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-27 09:06:26 +0000 |
commit | 20450649ca3132e55aea60436fa6117ca6c1ae5f (patch) | |
tree | 3b87d2e4b54e72a02dcc4d1af644fbf7269c2c2e /doc/development | |
parent | 3f0f13c6d9f567819d175b499cb437ebf3a63a38 (diff) | |
download | gitlab-ce-20450649ca3132e55aea60436fa6117ca6c1ae5f.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development')
-rw-r--r-- | doc/development/database_review.md | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/development/database_review.md b/doc/development/database_review.md index 89f4f09c86d..603c6290311 100644 --- a/doc/development/database_review.md +++ b/doc/development/database_review.md @@ -94,17 +94,18 @@ and details for a database reviewer: - Check queries timing (If any): Queries executed in a migration need to fit comfortably within `15s` - preferably much less than that - on GitLab.com. - Check [background migrations](background_migrations.md): - - For data migrations, establish a time estimate for execution + - Establish a time estimate for execution - They should only be used when migrating data in larger tables. - If a single `update` is below than `1s` the query can be placed directly in a regular migration (inside `db/migrate`). - Review queries (for example, make sure batch sizes are fine) - - Establish a time estimate for execution - Because execution time can be longer than for a regular migration, it's suggested to treat background migrations as post migrations: place them in `db/post_migrate` instead of `db/migrate`. Keep in mind that post migrations are executed post-deployment in production. - Check [timing guidelines for migrations](#timing-guidelines-for-migrations) +- 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). - Query performance - Check for any obviously complex queries and queries the author specifically points out for review (if any) |