summaryrefslogtreecommitdiff
path: root/db/post_migrate/20201001101136_remove_index_on_issues_relative_position.rb
blob: 605a167c0d5591378e1a30b2d9ad9a4d27b1b6fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

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

  INDEX_NAME = 'index_issues_on_relative_position'
  DOWNTIME = false

  disable_ddl_transaction!

  def up
    remove_concurrent_index_by_name(:issues, INDEX_NAME)
  end

  def down
    add_concurrent_index(:issues, :relative_position, name: INDEX_NAME)
  end
end