1# frozen_string_literal: true
2
3# When extended, silences this warning below:
4# WARNING: Active Record does not support composite primary key.
5#
6# project_authorizations has composite primary key. Composite primary key is ignored.
7#
8# See https://gitlab.com/gitlab-org/gitlab/-/issues/292909
9module SuppressCompositePrimaryKeyWarning
10  extend ActiveSupport::Concern
11
12  private
13
14  def suppress_composite_primary_key(pk)
15    silence_warnings do
16      super
17    end
18  end
19end
20