summaryrefslogtreecommitdiff
path: root/db/post_migrate/20201103192526_schedule_populate_has_vulnerabilities.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20201103192526_schedule_populate_has_vulnerabilities.rb')
-rw-r--r--db/post_migrate/20201103192526_schedule_populate_has_vulnerabilities.rb24
1 files changed, 0 insertions, 24 deletions
diff --git a/db/post_migrate/20201103192526_schedule_populate_has_vulnerabilities.rb b/db/post_migrate/20201103192526_schedule_populate_has_vulnerabilities.rb
deleted file mode 100644
index bed90af09dc..00000000000
--- a/db/post_migrate/20201103192526_schedule_populate_has_vulnerabilities.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-class SchedulePopulateHasVulnerabilities < ActiveRecord::Migration[6.0]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
- BATCH_SIZE = 1_000
- DELAY_INTERVAL = 2.minutes
- MIGRATION_CLASS = 'PopulateHasVulnerabilities'
-
- disable_ddl_transaction!
-
- def up
- Gitlab::BackgroundMigration::PopulateHasVulnerabilities::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
- end
-end