2022-01-26 12:08:38 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module BackgroundMigration
|
|
|
|
# Remove vulnerability finding link records
|
|
|
|
# The records will be repopulated from the `raw_metadata`
|
|
|
|
# column of `vulnerability_occurrences` once the unique
|
|
|
|
# index is in place.
|
|
|
|
class RemoveVulnerabilityFindingLinks
|
|
|
|
include Gitlab::Database::DynamicModelHelpers
|
|
|
|
|
|
|
|
def perform(start_id, stop_id)
|
2022-07-16 23:28:13 +05:30
|
|
|
define_batchable_model('vulnerability_finding_links', connection: ApplicationRecord.connection)
|
2022-04-04 11:22:00 +05:30
|
|
|
.where(id: start_id..stop_id)
|
|
|
|
.delete_all
|
2022-01-26 12:08:38 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|