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

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

class ScheduleIndexToCiJobArtifactStates < Gitlab::Database::Migration[2.2]
  milestone '16.7'
  disable_ddl_transaction!

  INDEX_NAME = :index_ci_job_artifact_states_on_job_artifact_id_partition_id
  TABLE_NAME = :ci_job_artifact_states
  COLUMNS = [:job_artifact_id, :partition_id]

  def up
    prepare_async_index(TABLE_NAME, COLUMNS, name: INDEX_NAME)
  end

  def down
    unprepare_async_index_by_name(TABLE_NAME, INDEX_NAME)
  end
end