Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20220920122121_schedule_index_removal_for_ci_builds_metadata.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 57475a08c933f7cb9707166ae40a38af2bb1334b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

class ScheduleIndexRemovalForCiBuildsMetadata < Gitlab::Database::Migration[2.0]
  disable_ddl_transaction!

  TABLE_NAME = :ci_builds_metadata
  INDEX_NAME = :index_ci_builds_metadata_on_build_id

  def up
    prepare_async_index_removal(TABLE_NAME, :build_id, name: INDEX_NAME)
  end

  def down
    unprepare_async_index(TABLE_NAME, :build_id, name: INDEX_NAME)
  end
end