summaryrefslogtreecommitdiff
path: root/doc/development/what_requires_downtime.md
diff options
context:
space:
mode:
authordineshpanda <dineshpanda92@gmail.com>2019-08-30 02:09:13 +0530
committerdineshpanda <dineshpanda92@gmail.com>2019-08-30 02:09:13 +0530
commitfa6f19d1f83b68f2bb729be889ab7d66adbbedb8 (patch)
treef33896c818180909073c47075798845d6ba335e1 /doc/development/what_requires_downtime.md
parent921d4f37230c8d6d5c097929520bed51e3679a0c (diff)
downloadgitlab-ce-fa6f19d1f83b68f2bb729be889ab7d66adbbedb8.tar.gz
Remove dependency on IgnorableColumn concern
Diffstat (limited to 'doc/development/what_requires_downtime.md')
-rw-r--r--doc/development/what_requires_downtime.md12
1 files changed, 4 insertions, 8 deletions
diff --git a/doc/development/what_requires_downtime.md b/doc/development/what_requires_downtime.md
index 944bf5900c5..b9d1b95a4d7 100644
--- a/doc/development/what_requires_downtime.md
+++ b/doc/development/what_requires_downtime.md
@@ -45,15 +45,12 @@ rule.
The first step is to ignore the column in the application code. This is
necessary because Rails caches the columns and re-uses this cache in various
-places. This can be done by including the `IgnorableColumn` module into the
-model, followed by defining the columns to ignore. For example, to ignore
+places. This can be done by defining the columns to ignore. For example, to ignore
`updated_at` in the User model you'd use the following:
```ruby
-class User < ActiveRecord::Base
- include IgnorableColumn
-
- ignore_column :updated_at
+class User < ApplicationRecord
+ self.ignored_columns = %i[updated_at]
end
```
@@ -64,8 +61,7 @@ column. Both these changes should be submitted in the same merge request.
Once the changes from step 1 have been released & deployed you can set up a
separate merge request that removes the ignore rule. This merge request can
-simply remove the `ignore_column` line, and the `include IgnorableColumn` line
-if no other `ignore_column` calls remain.
+simply remove the `self.ignored_columns` line.
## Renaming Columns