Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20210112143418_remove_duplicate_services2.rb')
-rw-r--r--db/post_migrate/20210112143418_remove_duplicate_services2.rb29
1 files changed, 0 insertions, 29 deletions
diff --git a/db/post_migrate/20210112143418_remove_duplicate_services2.rb b/db/post_migrate/20210112143418_remove_duplicate_services2.rb
deleted file mode 100644
index 83d92a78473..00000000000
--- a/db/post_migrate/20210112143418_remove_duplicate_services2.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-# This replaces the previous post-deployment migration 20201207165956_remove_duplicate_services_spec.rb,
-# we have to run this again due to a bug in how we were receiving the arguments in the background migration.
-class RemoveDuplicateServices2 < ActiveRecord::Migration[6.0]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
- INTERVAL = 2.minutes
- BATCH_SIZE = 5_000
- MIGRATION = 'RemoveDuplicateServices'
-
- disable_ddl_transaction!
-
- def up
- project_ids_with_duplicates = Gitlab::BackgroundMigration::RemoveDuplicateServices::Service.project_ids_with_duplicates
-
- project_ids_with_duplicates.each_batch(of: BATCH_SIZE, column: :project_id) do |batch, index|
- migrate_in(
- INTERVAL * index,
- MIGRATION,
- batch.pluck(:project_id)
- )
- end
- end
-
- def down
- end
-end