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

20210401134455_remove_index_mirror_data_on_next_execution_and_retry_count.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ee59e72e398861b470e6a72bd7455bf49fe979c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# frozen_string_literal: true

# See https://docs.gitlab.com/ee/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.

class RemoveIndexMirrorDataOnNextExecutionAndRetryCount < ActiveRecord::Migration[6.0]
  include Gitlab::Database::MigrationHelpers

  disable_ddl_transaction!

  DOWNTIME = false

  INDEX_NAME = 'index_mirror_data_on_next_execution_and_retry_count'

  def up
    remove_concurrent_index(
      :project_mirror_data,
      %i[next_execution_timestamp retry_count],
      name: INDEX_NAME
    )
  end

  def down
    add_concurrent_index(
      :project_mirror_data,
      %i[next_execution_timestamp retry_count],
      name: INDEX_NAME
    )
  end
end