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

20170816153940_add_index_on_ci_builds_protected.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: caf7c705a6ee353b54dc1689eba8fca7a74a677b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class AddIndexOnCiBuildsProtected < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  disable_ddl_transaction!

  def up
    add_concurrent_index :ci_builds, :protected
  end

  def down
    remove_concurrent_index :ci_builds, :protected if index_exists?(:ci_builds, :protected)
  end
end