diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 01:45:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 01:45:44 +0000 |
commit | 85dc423f7090da0a52c73eb66faf22ddb20efff9 (patch) | |
tree | 9160f299afd8c80c038f08e1545be119f5e3f1e1 /app/models/audit_event.rb | |
parent | 15c2c8c66dbe422588e5411eee7e68f1fa440bb8 (diff) | |
download | gitlab-ce-85dc423f7090da0a52c73eb66faf22ddb20efff9.tar.gz |
Add latest changes from gitlab-org/gitlab@13-4-stable-ee
Diffstat (limited to 'app/models/audit_event.rb')
-rw-r--r-- | app/models/audit_event.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/models/audit_event.rb b/app/models/audit_event.rb index e7cfa30a892..f46803be057 100644 --- a/app/models/audit_event.rb +++ b/app/models/audit_event.rb @@ -5,9 +5,9 @@ class AuditEvent < ApplicationRecord include IgnorableColumns include BulkInsertSafe - PARALLEL_PERSISTENCE_COLUMNS = [:author_name, :entity_path, :target_details].freeze + PARALLEL_PERSISTENCE_COLUMNS = [:author_name, :entity_path, :target_details, :target_type].freeze - ignore_column :updated_at, remove_with: '13.4', remove_after: '2020-09-22' + ignore_column :type, remove_with: '13.6', remove_after: '2020-11-22' serialize :details, Hash # rubocop:disable Cop/ActiveRecordSerialize @@ -29,6 +29,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' |