2021-08-04 18:09:57 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class BackfillIntegrationsTypeNew < ActiveRecord::Migration[6.1]
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
2022-05-19 12:08:42 +00:00
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2021-08-04 18:09:57 +00:00
|
|
|
MIGRATION = 'BackfillIntegrationsTypeNew'
|
|
|
|
INTERVAL = 2.minutes
|
|
|
|
|
|
|
|
def up
|
|
|
|
queue_batched_background_migration(
|
|
|
|
MIGRATION,
|
|
|
|
:integrations,
|
|
|
|
:id,
|
|
|
|
job_interval: INTERVAL
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
2022-05-18 18:08:05 +00:00
|
|
|
delete_batched_background_migration(MIGRATION, :integrations, :id, [])
|
2021-08-04 18:09:57 +00:00
|
|
|
end
|
|
|
|
end
|