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/lib/tasks
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2017-03-17 23:43:04 +0300
committerYorick Peterse <yorickpeterse@gmail.com>2017-03-21 13:49:24 +0300
commit69af06dda6bb8965a775360a836b0aab0447ccf6 (patch)
treecdf4310fef7b3a29df895fad7a558a859a2d1570 /lib/tasks
parent4146be04482f27bc10246dd471c3f08ec258e0ed (diff)
Add LIKE index for routes.path
Nested groups support uses queries along the lines of `path LIKE 'X/%'`. For these queries to use an index on PostgreSQL we need to use either the varchar_pattern_ops or text_pattern_ops operator class. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/29554
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/migrate/setup_postgresql.rake2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/tasks/migrate/setup_postgresql.rake b/lib/tasks/migrate/setup_postgresql.rake
index f5caca3ddbf..8938bc515f5 100644
--- a/lib/tasks/migrate/setup_postgresql.rake
+++ b/lib/tasks/migrate/setup_postgresql.rake
@@ -3,10 +3,12 @@ require Rails.root.join('lib/gitlab/database/migration_helpers')
require Rails.root.join('db/migrate/20151007120511_namespaces_projects_path_lower_indexes')
require Rails.root.join('db/migrate/20151008110232_add_users_lower_username_email_indexes')
require Rails.root.join('db/migrate/20161212142807_add_lower_path_index_to_routes')
+require Rails.root.join('db/migrate/20170317203554_index_routes_path_for_like')
desc 'GitLab | Sets up PostgreSQL'
task setup_postgresql: :environment do
NamespacesProjectsPathLowerIndexes.new.up
AddUsersLowerUsernameEmailIndexes.new.up
AddLowerPathIndexToRoutes.new.up
+ IndexRoutesPathForLike.new.up
end