Commit 345c4e64 authored by Tan Le's avatar Tan Le

Stop writing to update_at on audit_events

We are dropping this column as this is an append-only table. Even
though the column has been marked as ignored (via `IgnoreableColumn`),
we still miss the use case where attributes are updated directly via
`Gitlab::Database.bulk_insert`.
parent 1832db54
......@@ -4,7 +4,7 @@ class AuditEvent < ApplicationRecord
include CreatedAtFilterable
include IgnorableColumns
ignore_column :updated_at, remove_with: '13.3', remove_after: '2020-08-22'
ignore_column :updated_at, remove_with: '13.4', remove_after: '2020-09-22'
serialize :details, Hash # rubocop:disable Cop/ActiveRecordSerialize
......
......@@ -16,7 +16,6 @@ module EE
def attributes
base_payload.merge(type: SecurityEvent.to_s,
created_at: DateTime.current,
updated_at: DateTime.current,
details: @details.to_yaml)
end
......
......@@ -22,7 +22,6 @@ RSpec.describe EE::AuditEvents::BulkInsertService do
entity_type: entity_type,
type: 'SecurityEvent',
created_at: timestamp,
updated_at: timestamp,
details: {
updated_ref: 'master',
author_name: user.name,
......
......@@ -24,7 +24,6 @@ RSpec.describe EE::AuditEvents::RepositoryPushAuditEventService do
entity_type: entity_type,
type: 'SecurityEvent',
created_at: timestamp,
updated_at: timestamp,
ip_address: '127.0.0.1',
details: {
updated_ref: updated_ref,
......
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