Commit 73362fbe authored by Adam Hegyi's avatar Adam Hegyi

Merge branch 'prepare-async-artifacts-index-build' into 'master'

Schedule async index build for ci_job_artifacts

See merge request gitlab-org/gitlab!83664
parents 7a19589b c29adfe7
# frozen_string_literal: true
class PrepareIndexForCiJobArtifactsUnlockedWithExpireAt < Gitlab::Database::Migration[1.0]
TABLE_NAME = 'ci_job_artifacts'
INDEX_NAME = 'index_ci_job_artifacts_on_expire_at_for_removal'
CONDITIONS = 'locked = 0 AND expire_at IS NOT NULL'
def up
prepare_async_index TABLE_NAME, [:expire_at], where: CONDITIONS, name: INDEX_NAME
end
def down
unprepare_async_index_by_name TABLE_NAME, INDEX_NAME
end
end
fd738cf8a5642f96dc67a294dcf913d797b580a19f35d5ef76573c63bf2dd920
\ 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