summaryrefslogtreecommitdiff
path: root/app/models/user_detail.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/user_detail.rb')
-rw-r--r--app/models/user_detail.rb17
1 files changed, 2 insertions, 15 deletions
diff --git a/app/models/user_detail.rb b/app/models/user_detail.rb
index b3cca1e0cc0..c41cff67864 100644
--- a/app/models/user_detail.rb
+++ b/app/models/user_detail.rb
@@ -2,7 +2,8 @@
class UserDetail < ApplicationRecord
extend ::Gitlab::Utils::Override
- include CacheMarkdownField
+ include IgnorableColumns
+ ignore_columns %i[bio_html cached_markdown_version], remove_with: '13.6', remove_after: '2021-10-22'
belongs_to :user
@@ -13,20 +14,6 @@ class UserDetail < ApplicationRecord
before_save :prevent_nil_bio
- cache_markdown_field :bio
-
- def bio_html
- read_attribute(:bio_html) || bio
- end
-
- # For backward compatibility.
- # Older migrations (and their tests) reference the `User.migration_bot` where the `bio` attribute is set.
- # Here we disable writing the markdown cache when the `bio_html` column does not exist.
- override :invalidated_markdown_cache?
- def invalidated_markdown_cache?
- self.class.column_names.include?('bio_html') && super
- end
-
private
def prevent_nil_bio