Commit 42f58bb3 authored by Andreas Brandl's avatar Andreas Brandl

Merge branch 'docs-remove-migration-suggestion' into 'master'

Remove Recommendation to Use add_column for Small Tables

See merge request gitlab-org/gitlab!25829
parents e7f4e23a 3a33c34f
...@@ -432,10 +432,6 @@ default values if absolutely necessary. There is a RuboCop cop that will fail if ...@@ -432,10 +432,6 @@ default values if absolutely necessary. There is a RuboCop cop that will fail if
this method is used on some tables that are very large on GitLab.com, which this method is used on some tables that are very large on GitLab.com, which
would cause other issues. would cause other issues.
For a small table (such as an empty one or one with less than `1,000` records),
use `add_column` and `change_column_default` in a single-transaction migration,
combining it with other operations that don't require `disable_ddl_transaction!`.
## Changing the column default ## Changing the column default
One might think that changing a default column with `change_column_default` is an One might think that changing a default column with `change_column_default` is an
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment