debian-mirror-gitlab/db/post_migrate/20230125195503_queue_backfill_compliance_violations.rb
2023-05-27 22:25:52 +05:30

24 lines
595 B
Ruby

# frozen_string_literal: true
class QueueBackfillComplianceViolations < Gitlab::Database::Migration[2.1]
MIGRATION = 'BackfillComplianceViolations'
INTERVAL = 2.minutes
BATCH_SIZE = 10_000
disable_ddl_transaction!
restrict_gitlab_migration gitlab_schema: :gitlab_main
def up
queue_batched_background_migration(
MIGRATION,
:merge_requests_compliance_violations,
:id,
job_interval: INTERVAL,
batch_size: BATCH_SIZE
)
end
def down
delete_batched_background_migration(MIGRATION, :merge_requests_compliance_violations, :id, [])
end
end