summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Walker <bwalker@gitlab.com>2018-03-22 10:43:53 +0100
committerBrett Walker <bwalker@gitlab.com>2018-03-22 10:43:53 +0100
commitb871740dbd954ab72c0997ecd055fac06de9c050 (patch)
tree0498d0413e09b7ba70d69c3dd2ba90b1d6c58deb
parentb69ea0052d064a7f7cbf67187123196e6a78a05d (diff)
downloadgitlab-ce-bw-tweak-migration-style-guide-docs.tar.gz
make "What Requires Downtime?" a sectionbw-tweak-migration-style-guide-docs
-rw-r--r--doc/development/migration_style_guide.md16
1 files changed, 12 insertions, 4 deletions
diff --git a/doc/development/migration_style_guide.md b/doc/development/migration_style_guide.md
index 57a9d3c8cb5..a211effdfa7 100644
--- a/doc/development/migration_style_guide.md
+++ b/doc/development/migration_style_guide.md
@@ -23,10 +23,6 @@ When downtime is necessary the migration has to be approved by:
An up-to-date list of people holding these titles can be found at
<https://about.gitlab.com/team/>.
-The document ["What Requires Downtime?"](what_requires_downtime.md) specifies
-various database operations (such as ["adding, dropping, and renaming columns"](what_requires_downtime.md#adding-columns), ["changing column constraints and types"](what_requires_downtime.md#changing-column-constraints), and ["indexes, tables, and foreign keys"](what_requires_downtime.md#adding-indexes)), whether they require downtime and how to
-work around that whenever possible.
-
When writing your migrations, also consider that databases might have stale data
or inconsistencies and guard for that. Try to make as few assumptions as
possible about the state of the database.
@@ -41,6 +37,18 @@ Migrations that make changes to the database schema (e.g. adding a column) can
only be added in the monthly release, patch releases may only contain data
migrations _unless_ schema changes are absolutely required to solve a problem.
+## What Requires Downtime?
+
+The document ["What Requires Downtime?"](what_requires_downtime.md) specifies
+various database operations, such as
+
+- [adding, dropping, and renaming columns](what_requires_downtime.md#adding-columns)
+- [changing column constraints and types](what_requires_downtime.md#changing-column-constraints)
+- [adding and dropping indexes, tables, and foreign keys](what_requires_downtime.md#adding-indexes)
+
+and whether they require downtime and how to work around that whenever possible.
+
+
## Downtime Tagging
Every migration must specify if it requires downtime or not, and if it should