aff5c9f3e5
This is an ID-less table with just three columns: an association to the merge request diff the commit belongs to, the relative order of the commit within the merge request diff, and the commit SHA itself. Previously we stored much more information about the commits, so that we could display them even when they were deleted from the repo. Since 8.0, we ensure that those commits are kept around for as long as the target repo itself is, so we don't need to duplicate that data in the database.
41 lines
724 B
Ruby
41 lines
724 B
Ruby
module Gitlab
|
|
module CycleAnalytics
|
|
module MetricsTables
|
|
def mr_metrics_table
|
|
MergeRequest::Metrics.arel_table
|
|
end
|
|
|
|
def mr_table
|
|
MergeRequest.arel_table
|
|
end
|
|
|
|
def mr_diff_table
|
|
MergeRequestDiff.arel_table
|
|
end
|
|
|
|
def mr_diff_commits_table
|
|
MergeRequestDiffCommit.arel_table
|
|
end
|
|
|
|
def mr_closing_issues_table
|
|
MergeRequestsClosingIssues.arel_table
|
|
end
|
|
|
|
def issue_table
|
|
Issue.arel_table
|
|
end
|
|
|
|
def issue_metrics_table
|
|
Issue::Metrics.arel_table
|
|
end
|
|
|
|
def user_table
|
|
User.arel_table
|
|
end
|
|
|
|
def build_table
|
|
::CommitStatus.arel_table
|
|
end
|
|
end
|
|
end
|
|
end
|