summaryrefslogtreecommitdiff
path: root/db/post_migrate/20230404044338_drop_async_index_ci_job_artifacts_on_expire_at_for_removal.rb
blob: 7c3cb65c8849c2960d0378eb05106b0800ceeb94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

class DropAsyncIndexCiJobArtifactsOnExpireAtForRemoval < Gitlab::Database::Migration[2.1]
  INDEX_NAME = 'index_ci_job_artifacts_on_expire_at_for_removal'

  # TODO: Index to be destroyed synchronously in https://gitlab.com/gitlab-org/gitlab/-/issues/393913
  def up
    prepare_async_index_removal :ci_job_artifacts, :expire_at, name: INDEX_NAME
  end

  def down
    unprepare_async_index :ci_job_artifacts, :expire_at, name: INDEX_NAME
  end
end