Fix the AddNameIndexToNamespace migration to be reversible

This commit is contained in:
Douglas Barbosa Alexandre 2016-12-15 11:46:15 -02:00
parent d494c9a789
commit fd0d8a2832

View file

@ -13,7 +13,7 @@ class AddNameIndexToNamespace < ActiveRecord::Migration
end
def down
if index_exists?(:namespaces, :name)
if index_exists?(:namespaces, [:name, :parent_id])
remove_index :namespaces, [:name, :parent_id]
end
end