summaryrefslogtreecommitdiff
path: root/db/post_migrate/20220324032250_migrate_shimo_confluence_service_category.rb
blob: d341cc508744c785419de028e96a2cb68c012589 (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 MigrateShimoConfluenceServiceCategory < Gitlab::Database::Migration[1.0]
  MIGRATION = 'MigrateShimoConfluenceIntegrationCategory'
  DELAY_INTERVAL = 2.minutes
  BATCH_SIZE = 10_000

  disable_ddl_transaction!

  def up
    queue_background_migration_jobs_by_range_at_intervals(
      define_batchable_model('integrations').where(type_new: %w[Integrations::Confluence Integrations::Shimo]),
      MIGRATION,
      DELAY_INTERVAL,
      batch_size: BATCH_SIZE,
      track_jobs: true)
  end

  def down
  end
end