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:
authorYorick Peterse <yorickpeterse@gmail.com>2016-08-08 18:42:26 +0300
committerYorick Peterse <yorickpeterse@gmail.com>2016-08-10 12:09:53 +0300
commitee451ea5739c5d574a5c3c7db36c5a4c28206fd5 (patch)
tree146daa330112964481a3069db64453df79ccc6cd /doc/development/what_requires_downtime.md
parentfd3a2cf76318a84dc6d3bab9bd9a767c5112106d (diff)
Mention add_column_with_default in downtime guide
[ci skip]
Diffstat (limited to 'doc/development/what_requires_downtime.md')
-rw-r--r--doc/development/what_requires_downtime.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/development/what_requires_downtime.md b/doc/development/what_requires_downtime.md
index abd693cf72d..2574c2c0472 100644
--- a/doc/development/what_requires_downtime.md
+++ b/doc/development/what_requires_downtime.md
@@ -31,6 +31,14 @@ operation, even when using `ALGORITHM=INPLACE` and `LOCK=NONE`. This means
downtime _may_ be required when modifying large tables as otherwise the
operation could potentially take hours to complete.
+Adding a column with a default value _can_ be done without requiring downtime
+when using the migration helper method
+`Gitlab::Database::MigrationHelpers#add_column_with_default`. This method works
+similar to `add_column` except it updates existing rows in batches without
+blocking access to the table being modified. See ["Adding Columns With Default
+Values"](migration_style_guide.html#adding-columns-with-default-values) for more
+information on how to use this method.
+
## Dropping Columns
On PostgreSQL you can safely remove an existing column without the need for