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

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

class MergeRequestContextCommitDiffFile < ApplicationRecord
  include Gitlab::EncodingHelper
  include ShaAttribute
  include DiffFile

  belongs_to :merge_request_context_commit, inverse_of: :diff_files

  sha_attribute :sha
  alias_attribute :id, :sha

  # create MergeRequestContextCommitDiffFile by given diff file record(s)
  def self.bulk_insert(*args)
    Gitlab::Database.bulk_insert('merge_request_context_commit_diff_files', *args)
  end
end