Make migration symmetric

This commit is contained in:
Mark Chao 2018-10-29 18:36:32 +08:00
parent 666ddec9b2
commit b47e666026

View file

@ -8,7 +8,8 @@ class AddIndexToProjectDeployTokensDeployTokenId < ActiveRecord::Migration
disable_ddl_transaction!
def up
add_concurrent_index :project_deploy_tokens, :deploy_token_id
# MySQL already has index inserted
add_concurrent_index :project_deploy_tokens, :deploy_token_id if Gitlab::Database.postgresql?
end
def down