diff options
Diffstat (limited to 'db/post_migrate/20220331133802_schedule_backfill_topics_title.rb')
-rw-r--r-- | db/post_migrate/20220331133802_schedule_backfill_topics_title.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/db/post_migrate/20220331133802_schedule_backfill_topics_title.rb b/db/post_migrate/20220331133802_schedule_backfill_topics_title.rb new file mode 100644 index 00000000000..8e594a9df52 --- /dev/null +++ b/db/post_migrate/20220331133802_schedule_backfill_topics_title.rb @@ -0,0 +1,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 |