Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Chao <mchao@gitlab.com>2018-10-29 13:36:32 +0300
committerMark Chao <mchao@gitlab.com>2018-11-05 15:09:11 +0300
commitb47e666026c30dbfaa0012655bb01eb18d1c3a63 (patch)
tree9936ed9ef915701dc570379eca0f2187b74a278b /db/migrate/20180927073410_add_index_to_project_deploy_tokens_deploy_token_id.rb
parent666ddec9b209d795ee315d1ea896feb04c30e048 (diff)
Make migration symmetric
Diffstat (limited to 'db/migrate/20180927073410_add_index_to_project_deploy_tokens_deploy_token_id.rb')
-rw-r--r--db/migrate/20180927073410_add_index_to_project_deploy_tokens_deploy_token_id.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/db/migrate/20180927073410_add_index_to_project_deploy_tokens_deploy_token_id.rb b/db/migrate/20180927073410_add_index_to_project_deploy_tokens_deploy_token_id.rb
index cd78779068a..61d32fe16eb 100644
--- a/db/migrate/20180927073410_add_index_to_project_deploy_tokens_deploy_token_id.rb
+++ b/db/migrate/20180927073410_add_index_to_project_deploy_tokens_deploy_token_id.rb
@@ -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