diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-12-15 16:46:15 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-12-16 04:50:16 +0300 |
commit | fd0d8a28327e2f2a35fe84e057dbc29cc18fc4cc (patch) | |
tree | d2f44a53f04c46fab206576608fcdf24b7c011d8 /db | |
parent | d494c9a789799f3625c25273c3bbeb43a93a3b88 (diff) |
Fix the AddNameIndexToNamespace migration to be reversible
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20161206153754_add_name_index_to_namespace.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20161206153754_add_name_index_to_namespace.rb b/db/migrate/20161206153754_add_name_index_to_namespace.rb index aaa35ed6f0a..b3f3cb68a99 100644 --- a/db/migrate/20161206153754_add_name_index_to_namespace.rb +++ b/db/migrate/20161206153754_add_name_index_to_namespace.rb @@ -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 |