summaryrefslogtreecommitdiff
path: root/db/migrate/20170121130655_add_index_to_ci_runners_for_is_shared.rb
blob: 00aa0b311b1394f95d1286b6a40e81cd614b61ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# rubocop:disable RemoveIndex
class AddIndexToCiRunnersForIsShared < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  disable_ddl_transaction!

  def up
    add_concurrent_index :ci_runners, :is_shared
  end

  def down
    if index_exists?(:ci_runners, :is_shared)
      remove_index :ci_runners, :is_shared
    end
  end
end