diff options
Diffstat (limited to 'db/post_migrate/20200807152315_backfill_merge_request_diffs_files_counts.rb')
-rw-r--r-- | db/post_migrate/20200807152315_backfill_merge_request_diffs_files_counts.rb | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/db/post_migrate/20200807152315_backfill_merge_request_diffs_files_counts.rb b/db/post_migrate/20200807152315_backfill_merge_request_diffs_files_counts.rb deleted file mode 100644 index bc7e4712d19..00000000000 --- a/db/post_migrate/20200807152315_backfill_merge_request_diffs_files_counts.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class BackfillMergeRequestDiffsFilesCounts < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - # There are ~72 million records on GitLab.com at time of writing, so go fast - BATCH_SIZE = 10_000 - DELAY_INTERVAL = 2.minutes.to_i - MIGRATION = 'SetMergeRequestDiffFilesCount' - - disable_ddl_transaction! - - class MergeRequestDiff < ActiveRecord::Base - include EachBatch - - self.table_name = 'merge_request_diffs' - end - - def up - queue_background_migration_jobs_by_range_at_intervals( - MergeRequestDiff, MIGRATION, DELAY_INTERVAL, batch_size: BATCH_SIZE - ) - end - - def down - # no-op - end -end |