Skip to content

Add a rubocop rule for batched background migration's scope_to option

The batched background migrations that are EE and use scope_to option must also include ActiveSupport::Concern:

NOTE: For EE migrations that define scope_to, ensure the module extends ActiveSupport::Concern. Otherwise, records are processed without taking the scope into consideration.

Missing ActiveSupport::Concern can lead to processing a large amount of records and adversely affect the DB performance. We should check and warn if the concern is missing.