summaryrefslogtreecommitdiff
path: root/db/post_migrate/20200826220746_schedule_populate_resolved_on_default_branch_column.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20200826220746_schedule_populate_resolved_on_default_branch_column.rb')
-rw-r--r--db/post_migrate/20200826220746_schedule_populate_resolved_on_default_branch_column.rb28
1 files changed, 0 insertions, 28 deletions
diff --git a/db/post_migrate/20200826220746_schedule_populate_resolved_on_default_branch_column.rb b/db/post_migrate/20200826220746_schedule_populate_resolved_on_default_branch_column.rb
deleted file mode 100644
index 6faa4fc8101..00000000000
--- a/db/post_migrate/20200826220746_schedule_populate_resolved_on_default_branch_column.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class SchedulePopulateResolvedOnDefaultBranchColumn < ActiveRecord::Migration[6.0]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
- BATCH_SIZE = 100
- DELAY_INTERVAL = 5.minutes.to_i
- MIGRATION_CLASS = 'PopulateResolvedOnDefaultBranchColumn'
-
- disable_ddl_transaction!
-
- def up
- return unless Gitlab.ee?
-
- EE::Gitlab::BackgroundMigration::PopulateResolvedOnDefaultBranchColumn::Vulnerability.distinct.each_batch(of: BATCH_SIZE, column: :project_id) do |batch, index|
- project_ids = batch.pluck(:project_id)
- migrate_in(index * DELAY_INTERVAL, MIGRATION_CLASS, project_ids)
- end
- end
-
- def down
- # no-op
- # This migration schedules background tasks to populate
- # `resolved_on_default_branch` column of `vulnerabilities`
- # table so there is no rollback operation needed for this.
- end
-end