debian-mirror-gitlab/db/post_migrate/20211026070408_backfill_issue_search_data.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
446 B
Ruby
Raw Normal View History

2022-05-07 20:08:51 +05:30
# frozen_string_literal: true
class BackfillIssueSearchData < Gitlab::Database::Migration[1.0]
2022-07-23 23:45:48 +05:30
disable_ddl_transaction!
2022-05-07 20:08:51 +05:30
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-07-23 23:45:48 +05:30
delete_batched_background_migration(MIGRATION, :issues, :id, [])
2022-05-07 20:08:51 +05:30
end
end