summaryrefslogtreecommitdiff
path: root/db/migrate/20210616154808_remove_ci_build_protected_index.rb
blob: 25a8d159c1efff6776a81c6a0112d1527cace2c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

class RemoveCiBuildProtectedIndex < ActiveRecord::Migration[6.1]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  INDEX_NAME = 'index_ci_builds_on_protected'

  disable_ddl_transaction!

  def up
    remove_concurrent_index :ci_builds, :protected, name: INDEX_NAME
  end

  def down
    add_concurrent_index :ci_builds, :protected, name: INDEX_NAME
  end
end