BBM - Fix helper with single record

Ref: #590848

What does this MR do and why?

This MR fixes batched background migrations skipping execution for single-record tables & empty tables.

When queuing a migration, tables with one record or empty (min_value == max_value or min_cursor == max_cursor) were incorrectly marked as :finished immediately.

This meant the migration job never ran, leaving data unbackfilled causing upgrade failures on self-managed instances when the background migration was silently skipped.

Edited by Max Orefice

Merge request reports

Loading