Simplify down migration.

This commit is contained in:
Andreas Brandl 2018-02-20 16:40:32 +01:00
parent e0a331aecb
commit ef077fd9fd

View file

@ -15,7 +15,7 @@ class AddPartialIndexToProjectsForIndexOnlyScans < ActiveRecord::Migration
def down
if index_exists?(:projects, :id, name: INDEX_NAME)
remove_concurrent_index :projects, :id, name: INDEX_NAME, unique: true, where: 'visibility_level IN (10,20)'
remove_concurrent_index_by_name :projects, INDEX_NAME
end
end
end