Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-12-15 16:46:15 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-12-16 04:50:16 +0300
commitfd0d8a28327e2f2a35fe84e057dbc29cc18fc4cc (patch)
treed2f44a53f04c46fab206576608fcdf24b7c011d8 /db
parentd494c9a789799f3625c25273c3bbeb43a93a3b88 (diff)
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