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

mentionable_migration_methods.rb « concerns « models « user_mentions « background_migration « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: efb08d441006551bb00ff2035afc237b90f64462 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# frozen_string_literal: true

module Gitlab
  module BackgroundMigration
    module UserMentions
      module Models
        module Concerns
          # Extract common no_quote_columns method used in determining the columns that do not need
          # to be quoted for corresponding models
          module MentionableMigrationMethods
            extend ::ActiveSupport::Concern

            class_methods do
              def no_quote_columns
                [
                  :note_id,
                  user_mention_model.resource_foreign_key
                ]
              end
            end
          end
        end
      end
    end
  end
end