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

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

class SyncIndexForCiPipelinesPipelineIdBigint < Gitlab::Database::Migration[2.1]
  disable_ddl_transaction!

  TABLE_NAME = :ci_pipelines
  INDEX_NAME = 'index_ci_pipelines_on_auto_canceled_by_id_bigint'
  COLUMN_NAME = :auto_canceled_by_id_convert_to_bigint

  def up
    add_concurrent_index TABLE_NAME, COLUMN_NAME, name: INDEX_NAME
  end

  def down
    remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
  end
end