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
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/background_migration/backfill_namespace_traversal_ids_children.rb')
-rw-r--r--lib/gitlab/background_migration/backfill_namespace_traversal_ids_children.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/background_migration/backfill_namespace_traversal_ids_children.rb b/lib/gitlab/background_migration/backfill_namespace_traversal_ids_children.rb
index 587de1bcb5a..3b8a452b855 100644
--- a/lib/gitlab/background_migration/backfill_namespace_traversal_ids_children.rb
+++ b/lib/gitlab/background_migration/backfill_namespace_traversal_ids_children.rb
@@ -19,7 +19,7 @@ module Gitlab
def perform(start_id, end_id, sub_batch_size)
batch_query = Namespace.base_query.where(id: start_id..end_id)
batch_query.each_batch(of: sub_batch_size) do |sub_batch|
- first, last = sub_batch.pluck(Arel.sql('min(id), max(id)')).first
+ first, last = sub_batch.pick(Arel.sql('min(id), max(id)'))
ranged_query = Namespace.unscoped.base_query.where(id: first..last)
update_sql = <<~SQL