summaryrefslogtreecommitdiff
path: root/lib/gitlab/background_migration/user_mentions/models/commit.rb
blob: 65f4a7a25b6b1146e2d8445dfb3bcf24df5ee61c (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
27
28
29
30
31
32
33
34
35
36
# frozen_string_literal: true
# rubocop:disable Style/Documentation

module Gitlab
  module BackgroundMigration
    module UserMentions
      module Models
        class Commit
          include EachBatch
          include Concerns::IsolatedMentionable
          include Concerns::MentionableMigrationMethods

          def self.user_mention_model
            Gitlab::BackgroundMigration::UserMentions::Models::CommitUserMention
          end

          def user_mention_model
            self.class.user_mention_model
          end

          def user_mention_resource_id
            id
          end

          def user_mention_note_id
            'NULL'
          end

          def self.no_quote_columns
            [:note_id]
          end
        end
      end
    end
  end
end