summaryrefslogtreecommitdiff
path: root/db/post_migrate/20170526185901_remove_stage_id_index_from_builds.rb
blob: a2c0b0c651b03bc0003fdf8adcd73b8921b8efdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class RemoveStageIdIndexFromBuilds < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  disable_ddl_transaction!

  def up
    if index_exists?(:ci_builds, :stage_id)
      remove_concurrent_index(:ci_builds, :stage_id)
    end
  end

  def down
    # noop
  end
end