debian-mirror-gitlab/db/migrate/20190719174505_add_index_to_deploy_tokens_token_encrypted.rb
2019-12-04 20:38:33 +05:30

18 lines
449 B
Ruby

# frozen_string_literal: true
class AddIndexToDeployTokensTokenEncrypted < ActiveRecord::Migration[5.1]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :deploy_tokens, :token_encrypted, unique: true, name: "index_deploy_tokens_on_token_encrypted"
end
def down
remove_concurrent_index_by_name :deploy_tokens, "index_deploy_tokens_on_token_encrypted"
end
end