summaryrefslogtreecommitdiff
path: root/db/migrate/20170317203554_index_routes_path_for_like.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20170317203554_index_routes_path_for_like.rb')
-rw-r--r--db/migrate/20170317203554_index_routes_path_for_like.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/db/migrate/20170317203554_index_routes_path_for_like.rb b/db/migrate/20170317203554_index_routes_path_for_like.rb
index 7ac09b2abe5..8d3609135d0 100644
--- a/db/migrate/20170317203554_index_routes_path_for_like.rb
+++ b/db/migrate/20170317203554_index_routes_path_for_like.rb
@@ -21,9 +21,8 @@ class IndexRoutesPathForLike < ActiveRecord::Migration
def down
return unless Gitlab::Database.postgresql?
+ return unless index_exists?(:routes, :path, name: INDEX_NAME)
- if index_exists?(:routes, :path, name: INDEX_NAME)
- execute("DROP INDEX CONCURRENTLY #{INDEX_NAME};")
- end
+ remove_concurrent_index_by_name(:routes, INDEX_NAME)
end
end