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

20231011142714_queue_backfill_has_remediations_of_vulnerability_reads.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 12de83a384e5744d1e9ad087422080b04c762ec5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

class QueueBackfillHasRemediationsOfVulnerabilityReads < Gitlab::Database::Migration[2.1]
  MIGRATION = "BackfillHasRemediationsOfVulnerabilityReads"
  DELAY_INTERVAL = 2.minutes
  BATCH_SIZE = 10_000
  SUB_BATCH_SIZE = 50

  restrict_gitlab_migration gitlab_schema: :gitlab_main
  disable_ddl_transaction!

  # per: https://docs.gitlab.com/ee/development/database/batched_background_migrations.html#requeuing-batched-background-migrations
  # > When you requeue the batched background migration, turn the original queuing
  # > into a no-op by clearing up the #up and #down methods of the migration
  # > performing the requeuing. Otherwise, the batched background migration is
  # > queued multiple times on systems that are upgrading multiple patch releases
  # > at once.
  #
  # being re-run via https://gitlab.com/gitlab-org/gitlab/-/merge_requests/135747
  def up; end

  def down; end
end