Commit 5f2e5d2c authored by Andreas Brandl's avatar Andreas Brandl

Merge branch '241267-specify-audit-events-primary-key' into 'master'

Add explicit primary key definition to AuditEvent

See merge request gitlab-org/gitlab!48925
parents c731e76a f066eee6
...@@ -13,6 +13,8 @@ class AuditEvent < ApplicationRecord ...@@ -13,6 +13,8 @@ class AuditEvent < ApplicationRecord
:target_id :target_id
].freeze ].freeze
self.primary_key = :id
serialize :details, Hash # rubocop:disable Cop/ActiveRecordSerialize serialize :details, Hash # rubocop:disable Cop/ActiveRecordSerialize
belongs_to :user, foreign_key: :author_id belongs_to :user, foreign_key: :author_id
......
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