summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2017-05-18 11:19:39 +0000
committerYorick Peterse <yorickpeterse@gmail.com>2017-05-18 11:19:39 +0000
commit8f2bdeb7234f72a5c3b8fe93352018449c8acb27 (patch)
tree77fa8e6331927f03dd285507aef862fc1fd6ec8d
parent9e34c8dc1c97b3dc26f5938189813bf676f3ed7f (diff)
parentcf9d9d865daee2f3c0dd549afa3b168a8e1e679e (diff)
downloadgitlab-ce-8f2bdeb7234f72a5c3b8fe93352018449c8acb27.tar.gz
Merge branch 'change_migration_style_guide' into 'master'
[Migration guide] Add a note about prefering change_column_null over change_column See merge request !11473
-rw-r--r--doc/development/what_requires_downtime.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/development/what_requires_downtime.md b/doc/development/what_requires_downtime.md
index 8da6ad684f5..c4830322fa8 100644
--- a/doc/development/what_requires_downtime.md
+++ b/doc/development/what_requires_downtime.md
@@ -139,6 +139,8 @@ Adding or removing a NOT NULL clause (or another constraint) can typically be
done without requiring downtime. However, this does require that any application
changes are deployed _first_. Thus, changing the constraints of a column should
happen in a post-deployment migration.
+NOTE: Avoid using `change_column` as it produces inefficient query because it re-defines
+the whole column type. For example, to add a NOT NULL constraint, prefer `change_column_null `
## Changing Column Types