From 5eb4a47204931ebf5e5f40a3653f1ba9557af2ce Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Fri, 23 Jun 2017 00:20:44 +0800 Subject: We cannot delete the index for MySQL, because fk foreign key, I mean. --- db/migrate/20170622135728_add_unique_constraint_to_ci_variables.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20170622135728_add_unique_constraint_to_ci_variables.rb b/db/migrate/20170622135728_add_unique_constraint_to_ci_variables.rb index f953cd66414..69729a17054 100644 --- a/db/migrate/20170622135728_add_unique_constraint_to_ci_variables.rb +++ b/db/migrate/20170622135728_add_unique_constraint_to_ci_variables.rb @@ -12,7 +12,7 @@ class AddUniqueConstraintToCiVariables < ActiveRecord::Migration end def down - if index_exists?(:ci_variables, columns) + if index_exists?(:ci_variables, columns) && Gitlab::Database.postgresql? remove_concurrent_index(:ci_variables, columns) end end -- cgit v1.2.1