debian-mirror-gitlab/app/models/merge_request_context_commit_diff_file.rb

20 lines
564 B
Ruby
Raw Normal View History

2020-03-13 15:44:24 +05:30
# frozen_string_literal: true
class MergeRequestContextCommitDiffFile < ApplicationRecord
2021-03-11 19:13:27 +05:30
extend SuppressCompositePrimaryKeyWarning
2020-03-13 15:44:24 +05:30
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)
2020-06-23 00:09:42 +05:30
Gitlab::Database.bulk_insert('merge_request_context_commit_diff_files', *args) # rubocop:disable Gitlab/BulkInsert
2020-03-13 15:44:24 +05:30
end
end