summaryrefslogtreecommitdiff
path: root/lib/gitlab/background_migration/fix_user_project_route_names.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/background_migration/fix_user_project_route_names.rb')
-rw-r--r--lib/gitlab/background_migration/fix_user_project_route_names.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/background_migration/fix_user_project_route_names.rb b/lib/gitlab/background_migration/fix_user_project_route_names.rb
index 6b99685fd68..e534f2449aa 100644
--- a/lib/gitlab/background_migration/fix_user_project_route_names.rb
+++ b/lib/gitlab/background_migration/fix_user_project_route_names.rb
@@ -8,7 +8,7 @@ module Gitlab
class FixUserProjectRouteNames
def perform(from_id, to_id)
ActiveRecord::Base.connection.execute <<~ROUTES_UPDATE
- WITH routes_to_update AS (
+ WITH routes_to_update AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported} (
SELECT
routes.id,
users.name || ' / ' || projects.name AS correct_name