Commit 88112e32 authored by Max Orefice's avatar Max Orefice Committed by Alex Ives

Creates asynchronously index on ci_job_artifacts table

The index will be used to fix job artifacts size for gitlab
instances which is currently broken. This will be fixed in a
separated MR.

Changelog: added
parent ffb0b059
# frozen_string_literal: true
# See https://docs.gitlab.com/ee/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class AddAsyncIndexCiJobArtifactsProjectIdCreatedAt < Gitlab::Database::Migration[1.0]
INDEX_NAME = 'index_ci_job_artifacts_on_id_project_id_and_created_at'
def up
prepare_async_index :ci_job_artifacts, [:project_id, :created_at, :id], name: INDEX_NAME
end
def down
unprepare_async_index_by_name :ci_job_artifacts, INDEX_NAME
end
end
56d906eac31954988bd0659eabbc9f1bad1a47dd616fb99e4b90b56b2bf4c6a0
\ No newline at end of file
Markdown is supported
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