diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-21 12:10:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-21 12:10:08 +0300 |
commit | 202268ad93e9a1556f5700326be5ec89bd641a97 (patch) | |
tree | db1faf51de8859ccd812e4a6ed61284cc3bb6a9a /app/models/audit_event.rb | |
parent | 3c63ea4631f629f83c7d35e65963ffc1acf83161 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/audit_event.rb')
-rw-r--r-- | app/models/audit_event.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/audit_event.rb b/app/models/audit_event.rb index e7cfa30a892..c496e152995 100644 --- a/app/models/audit_event.rb +++ b/app/models/audit_event.rb @@ -7,6 +7,7 @@ class AuditEvent < ApplicationRecord PARALLEL_PERSISTENCE_COLUMNS = [:author_name, :entity_path, :target_details].freeze + ignore_column :type, remove_with: '13.6', remove_after: '2020-11-22' ignore_column :updated_at, remove_with: '13.4', remove_after: '2020-09-22' serialize :details, Hash # rubocop:disable Cop/ActiveRecordSerialize @@ -29,6 +30,14 @@ class AuditEvent < ApplicationRecord # https://gitlab.com/groups/gitlab-org/-/epics/2765 after_validation :parallel_persist + # Note: After loading records, do not attempt to type cast objects it finds. + # We are in the process of deprecating STI (i.e. SecurityEvent) out of AuditEvent. + # + # https://gitlab.com/gitlab-org/gitlab/-/issues/216845 + def self.inheritance_column + :_type_disabled + end + def self.order_by(method) case method.to_s when 'created_asc' |