summaryrefslogtreecommitdiff
path: root/db/post_migrate/20210727113447_backfill_integrations_type_new.rb
blob: 47238bae4d5014b4af2b548274743c53015c7800 (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 BackfillIntegrationsTypeNew < ActiveRecord::Migration[6.1]
  include Gitlab::Database::MigrationHelpers

  disable_ddl_transaction!

  MIGRATION = 'BackfillIntegrationsTypeNew'
  INTERVAL = 2.minutes

  def up
    queue_batched_background_migration(
      MIGRATION,
      :integrations,
      :id,
      job_interval: INTERVAL
    )
  end

  def down
    delete_batched_background_migration(MIGRATION, :integrations, :id, [])
  end
end