20160616103948_add_unique_index_to_keys_fingerprint.rb 306 Bytes
Newer Older
1
# rubocop:disable RemoveIndex
2
class AddUniqueIndexToKeysFingerprint < ActiveRecord::Migration[4.2]
3 4 5 6 7 8 9 10 11 12 13 14
  include Gitlab::Database::MigrationHelpers

  disable_ddl_transaction!

  def up
    add_concurrent_index :keys, :fingerprint, unique: true
  end

  def down
    remove_index :keys, :fingerprint
  end
end