Skip to content
Snippets Groups Projects
Unverified Commit 87b8b900 authored by Maxime Orefice's avatar Maxime Orefice
Browse files

Prepare async index to for Ci::JobArtifact

This commit adds a new index to optimize how we fetch
job artifacts when recalculating artifact size and ordering
them by id.

Changelog: performance
parent 870e6363
No related merge requests found
# frozen_string_literal: true
class PrepareJobArtifactOrderingIndex < Gitlab::Database::Migration[2.0]
INDEX_NAME = 'index_ci_job_artifacts_on_id_and_created_at_and_project_id'
def up
prepare_async_index :ci_job_artifacts, [:id, :created_at, :project_id], name: INDEX_NAME
end
def down
unprepare_async_index :notes, [:id, :created_at, :project_id], name: INDEX_NAME
end
end
d8862fbc28d41c2d61dbb49415ab344e5c010940cede13fe2c6bfdc7832fb605
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment