20160920160832_add_index_to_labels_title.rb 327 Bytes
Newer Older
1
# rubocop:disable RemoveIndex
2
class AddIndexToLabelsTitle < ActiveRecord::Migration[4.2]
Ahmad Sherif's avatar
Ahmad Sherif committed
3 4 5 6 7 8
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  disable_ddl_transaction!

9
  def up
Ahmad Sherif's avatar
Ahmad Sherif committed
10 11
    add_concurrent_index :labels, :title
  end
12 13 14 15

  def down
    remove_index :labels, :title if index_exists? :labels, :title
  end
Ahmad Sherif's avatar
Ahmad Sherif committed
16
end