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:
authorMayra Cabrera <mcabrera@gitlab.com>2019-08-27 13:22:12 +0300
committerEvan Read <eread@gitlab.com>2019-08-27 13:22:12 +0300
commit9d5ea4203c374c1c2994e0ed97c3204039093d96 (patch)
tree9720ef0a91f3c122a06eeb72a4e0528f6ea271c4 /doc/development/database_review.md
parent0839fb0c2f6dd6da76a4b4dbdee7c96e3fb2efe1 (diff)
Migrations guide: use atomic steps, when possible
Currently, the DB migrations guide says that "you must" use non-blocking operations (such as CREATE INDEX CONCURRENTLY), always. But this does not make sense in cases of empty tables and leads to splitting the work to multiple non-atomic (with disable_ddl_transaction!) DB migrations. To follow KISS principle, to have fewer DB migrations steps, to have them atomic when it's possible and simplify deployment and troubleshooting, the following exceptions were added to the doc: - index creation, - index dropping, - defining an FK, - adding a column with DEFAULT,
Diffstat (limited to 'doc/development/database_review.md')
-rw-r--r--doc/development/database_review.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/development/database_review.md b/doc/development/database_review.md
index 3f1b359cb0b..367a481ee11 100644
--- a/doc/development/database_review.md
+++ b/doc/development/database_review.md
@@ -91,7 +91,7 @@ and details for a database reviewer:
concurrent index/foreign key helpers (with transactions disabled)
- Check consistency with `db/schema.rb` and that migrations are [reversible](migration_style_guide.md#reversibility)
- Check queries timing (If any): Queries executed in a migration
- need to fit comfortable 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):
- For data migrations, establish a time estimate for execution
- They should only be used when migrating data in larger tables.