summaryrefslogtreecommitdiff
path: root/lib/gitlab/background_migration/batching_strategies/loose_index_scan_batching_strategy.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/background_migration/batching_strategies/loose_index_scan_batching_strategy.rb')
-rw-r--r--lib/gitlab/background_migration/batching_strategies/loose_index_scan_batching_strategy.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/background_migration/batching_strategies/loose_index_scan_batching_strategy.rb b/lib/gitlab/background_migration/batching_strategies/loose_index_scan_batching_strategy.rb
index 5cad9d2e3c4..fc08d2b0ab6 100644
--- a/lib/gitlab/background_migration/batching_strategies/loose_index_scan_batching_strategy.rb
+++ b/lib/gitlab/background_migration/batching_strategies/loose_index_scan_batching_strategy.rb
@@ -24,7 +24,7 @@ module Gitlab
next_batch_bounds = nil
relation.distinct_each_batch(of: batch_size, column: column_name) do |batch| # rubocop:disable Lint/UnreachableLoop
- next_batch_bounds = batch.pluck(Arel.sql("MIN(#{quoted_column_name}), MAX(#{quoted_column_name})")).first
+ next_batch_bounds = batch.pick(Arel.sql("MIN(#{quoted_column_name}), MAX(#{quoted_column_name})"))
break
end