Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20201211090634_schedule_populate_finding_uuid_for_vulnerability_feedback.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3ecb48dab0f19cd506349baf89329d9404ad3c7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# 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