2017-04-05 22:53:57 +00:00
|
|
|
# rubocop:disable RemoveIndex
|
2018-11-13 07:27:31 +00:00
|
|
|
class AddUniqueIndexToKeysFingerprint < ActiveRecord::Migration[4.2]
|
2016-06-16 10:53:32 +00:00
|
|
|
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
|