26 lines
620 B
Ruby
26 lines
620 B
Ruby
# frozen_string_literal: true
|
|
|
|
class SchedulePopulateFindingUuidForVulnerabilityFeedback < ActiveRecord::Migration[6.0]
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
DOWNTIME = false
|
|
MIGRATION_CLASS = 'PopulateFindingUuidForVulnerabilityFeedback'
|
|
DELAY_INTERVAL = 2.minutes
|
|
BATCH_SIZE = 1000
|
|
|
|
disable_ddl_transaction!
|
|
|
|
def up
|
|
queue_background_migration_jobs_by_range_at_intervals(
|
|
Gitlab::BackgroundMigration::PopulateFindingUuidForVulnerabilityFeedback::VulnerabilityFeedback,
|
|
MIGRATION_CLASS,
|
|
DELAY_INTERVAL,
|
|
batch_size: BATCH_SIZE
|
|
)
|
|
end
|
|
|
|
def down
|
|
# no-op
|
|
end
|
|
end
|