debian-mirror-gitlab/db/migrate/20160616103948_add_unique_index_to_keys_fingerprint.rb

15 lines
301 B
Ruby
Raw Normal View History

2017-08-17 22:00:37 +05:30
# rubocop:disable RemoveIndex
2016-06-22 15:30:34 +05:30
class AddUniqueIndexToKeysFingerprint < ActiveRecord::Migration
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