summaryrefslogtreecommitdiff
path: root/db/post_migrate/20220331133802_schedule_backfill_topics_title.rb
blob: 8e594a9df525e7ff0c630119dc112a060a76d156 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

class ScheduleBackfillTopicsTitle < Gitlab::Database::Migration[1.0]
  MIGRATION = 'BackfillTopicsTitle'
  DELAY_INTERVAL = 2.minutes

  disable_ddl_transaction!

  def up
    queue_background_migration_jobs_by_range_at_intervals(
      define_batchable_model('topics'),
      MIGRATION,
      DELAY_INTERVAL,
      track_jobs: true
    )
  end

  def down
    # no-op
  end
end