Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-07 03:09:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-07 03:09:33 +0300
commitb56027c9d80ac0e297ba8a43c81e8504172dbf9f (patch)
treeb85f743277145e930ae195664655d696e6e0a7fc /doc/development/database_review.md
parent7915c41e4261719719e791602c8235574157164c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/database_review.md')
-rw-r--r--doc/development/database_review.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/development/database_review.md b/doc/development/database_review.md
index d95fd7a38f6..f2db0ab4fd5 100644
--- a/doc/development/database_review.md
+++ b/doc/development/database_review.md
@@ -77,7 +77,9 @@ the following preparations into account.
- Ensure `db/structure.sql` is updated.
- Make migrations reversible by using the `change` method or include a `down` method when using `up`.
- Include either a rollback procedure or describe how to rollback changes.
-- Add the output of the migration(s) to the MR description.
+- Add the output of both migrating and rolling back for all migrations into the MR description
+ - Ensure the down method reverts the changes in `db/structure.sql`
+ - Update the migration output whenever you modify the migrations during the review process
- Add tests for the migration in `spec/migrations` if necessary. See [Testing Rails migrations at GitLab](testing_guide/testing_migrations_guide.md) for more details.
- When [high-traffic](https://gitlab.com/gitlab-org/gitlab/-/blob/master/rubocop/migration_helpers.rb#L12) tables are involved in the migration, use the [`with_lock_retries`](migration_style_guide.md#retry-mechanism-when-acquiring-database-locks) helper method. Review the relevant [examples in our documentation](migration_style_guide.md#examples) for use cases and solutions.
- Ensure RuboCop checks are not disabled unless there's a valid reason to.