Welcome to mirror list, hosted at ThFree Co, Russian Federation.

suppress_composite_primary_key_warning.rb « concerns « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 32634e7bc7268c9e0c5b4ea77909e381ba73c031 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

# When extended, silences this warning below:
# WARNING: Active Record does not support composite primary key.
#
# project_authorizations has composite primary key. Composite primary key is ignored.
#
# See https://gitlab.com/gitlab-org/gitlab/-/issues/292909
module SuppressCompositePrimaryKeyWarning
  extend ActiveSupport::Concern

  private

  def suppress_composite_primary_key(pk)
    silence_warnings do
      super
    end
  end
end