diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-23 21:14:10 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-23 21:14:10 +0300 |
commit | 27b95711dd76c60c460cb1f4e37edd68c67b605c (patch) | |
tree | 53d5e3862927592a0928953a59ac79b634b7f32f /doc/development/database_review.md | |
parent | 273ee970db58a0488d7b1de5ad7c62bfd21572e4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/database_review.md')
-rw-r--r-- | doc/development/database_review.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/development/database_review.md b/doc/development/database_review.md index 45be797b720..e3ebac8d821 100644 --- a/doc/development/database_review.md +++ b/doc/development/database_review.md @@ -132,6 +132,18 @@ test its execution using `CREATE INDEX CONCURRENTLY` in the `#database-lab` Slac - This job runs migrations in a production-like environment (similar to `#database_lab`) and posts to the MR its findings (queries, runtime, size change). - Review migration runtimes and any warnings. +#### Preparation when adding data migrations + +Data migrations are inherently risky. Additional actions are required to reduce the possibility +of error that would result in corruption or loss of production data. + +Include in the MR description: + +- If the migration itself is not reversible, details of how data changes could be reverted in the event of an incident. For example, in the case of a migration that deletes records (an operation that most of the times is not automatically revertable), how _could_ the deleted records be recovered. +- If the migration deletes data apply the label `~data-deletion` +- Concise descriptions of possible user experience impact of an error; for example, "Issues would unexpectedly go missing from Epics". +- Relevant data from the [query plans](#query-plans) that indicate the query works as expected; such as the approximate number of records that will be modified/deleted. + #### Preparation when adding or modifying queries ##### Raw SQL |