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

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

class AddTmpIndexOnIdAndMigrationStateToContainerRepositories < Gitlab::Database::Migration[1.0]
  INDEX_NAME = 'tmp_index_container_repositories_on_id_migration_state'

  disable_ddl_transaction!

  # Temporary index to be removed https://gitlab.com/gitlab-org/gitlab/-/issues/351783
  def up
    add_concurrent_index :container_repositories, [:id, :migration_state], name: INDEX_NAME
  end

  def down
    remove_concurrent_index_by_name :container_repositories, INDEX_NAME
  end
end