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