2022-02-24 01:13:09 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class BackfillIssueSearchData < Gitlab::Database::Migration[1.0]
|
2022-05-19 08:08:42 -04:00
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2022-02-24 01:13:09 -05:00
|
|
|
MIGRATION = 'BackfillIssueSearchData'
|
|
|
|
|
|
|
|
def up
|
|
|
|
queue_batched_background_migration(
|
|
|
|
MIGRATION,
|
|
|
|
:issues,
|
|
|
|
:id,
|
|
|
|
batch_size: 100_000,
|
|
|
|
sub_batch_size: 1_000,
|
|
|
|
job_interval: 5.minutes
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
2022-05-18 14:08:05 -04:00
|
|
|
delete_batched_background_migration(MIGRATION, :issues, :id, [])
|
2022-02-24 01:13:09 -05:00
|
|
|
end
|
|
|
|
end
|