summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-12-15 11:46:15 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-12-15 23:50:16 -0200
commitfd0d8a28327e2f2a35fe84e057dbc29cc18fc4cc (patch)
treed2f44a53f04c46fab206576608fcdf24b7c011d8 /db
parentd494c9a789799f3625c25273c3bbeb43a93a3b88 (diff)
downloadgitlab-ce-fd0d8a28327e2f2a35fe84e057dbc29cc18fc4cc.tar.gz
Fix the AddNameIndexToNamespace migration to be reversible
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20161206153754_add_name_index_to_namespace.rb2
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