Commit f066eee6 authored by pbair's avatar pbair

Add explicity primary key definition to AuditEvent

As a part of the change for partitioning audit_events, the AuditEvent
model will need to have the primary_key explicitly set to use only the
id column. While the database table also includes the partition key
(created_at) in the primary key definition, due to Rails support for
multi-column PK it's easier to simply use the id column, which should
still be unique as it's backed by a sequence.
parent 45b38556
......@@ -13,6 +13,8 @@ class AuditEvent < ApplicationRecord
:target_id
].freeze
self.primary_key = :id
serialize :details, Hash # rubocop:disable Cop/ActiveRecordSerialize
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