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:
authorDouwe Maan <douwe@gitlab.com>2017-03-21 23:37:05 +0300
committerDJ Mountney <david@twkie.net>2017-03-22 00:21:38 +0300
commitadd9adbb01b8079d75af9fed53e66ce419ce3274 (patch)
treefc8969de3379cdba842c0964f38c6e6e3ecd62b1 /db
parent68873d7457dda6657dc29aba468337f8da2445b3 (diff)
Merge branch 'fix-routes-index-migration' into 'master'
Fix routes index migration See merge request !10121
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170317203554_index_routes_path_for_like.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/migrate/20170317203554_index_routes_path_for_like.rb b/db/migrate/20170317203554_index_routes_path_for_like.rb
index 264ecd322c3..7ac09b2abe5 100644
--- a/db/migrate/20170317203554_index_routes_path_for_like.rb
+++ b/db/migrate/20170317203554_index_routes_path_for_like.rb
@@ -14,7 +14,7 @@ class IndexRoutesPathForLike < ActiveRecord::Migration
def up
return unless Gitlab::Database.postgresql?
- unless index_exists?(:routes, name: INDEX_NAME)
+ unless index_exists?(:routes, :path, name: INDEX_NAME)
execute("CREATE INDEX CONCURRENTLY #{INDEX_NAME} ON routes (path varchar_pattern_ops);")
end
end
@@ -22,7 +22,7 @@ class IndexRoutesPathForLike < ActiveRecord::Migration
def down
return unless Gitlab::Database.postgresql?
- if index_exists?(:routes, name: INDEX_NAME)
+ if index_exists?(:routes, :path, name: INDEX_NAME)
execute("DROP INDEX CONCURRENTLY #{INDEX_NAME};")
end
end