Files
gitlab-foss/lib/gitlab/background_migration/backfill_security_findings_project_id.rb
2024-11-07 03:22:58 +00:00

19 lines
506 B
Ruby

# frozen_string_literal: true
module Gitlab
module BackgroundMigration
class BackfillSecurityFindingsProjectId < BackfillDesiredShardingKeyJob
operation_name :backfill_security_findings_project_id
feature_category :vulnerability_management
scope_to ->(relation) { relation }
def perform
each_sub_batch do |sub_batch|
sub_batch.connection.execute(construct_query(sub_batch: sub_batch.where(backfill_column => nil)))
end
end
end
end
end