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 'lib/gitlab/background_migration/populate_issue_email_participants.rb')
-rw-r--r--lib/gitlab/background_migration/populate_issue_email_participants.rb28
1 files changed, 0 insertions, 28 deletions
diff --git a/lib/gitlab/background_migration/populate_issue_email_participants.rb b/lib/gitlab/background_migration/populate_issue_email_participants.rb
deleted file mode 100644
index 2b959b81f45..00000000000
--- a/lib/gitlab/background_migration/populate_issue_email_participants.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-module Gitlab
- module BackgroundMigration
- # Class to migrate service_desk_reply_to email addresses to issue_email_participants
- class PopulateIssueEmailParticipants
- # rubocop:disable Style/Documentation
- class TmpIssue < ActiveRecord::Base
- self.table_name = 'issues'
- end
-
- def perform(start_id, stop_id)
- issues = TmpIssue.select(:id, :service_desk_reply_to, :created_at).where(id: (start_id..stop_id)).where.not(service_desk_reply_to: nil)
-
- rows = issues.map do |issue|
- {
- issue_id: issue.id,
- email: issue.service_desk_reply_to,
- created_at: issue.created_at,
- updated_at: issue.created_at
- }
- end
-
- ApplicationRecord.legacy_bulk_insert(:issue_email_participants, rows, on_conflict: :do_nothing) # rubocop:disable Gitlab/BulkInsert
- end
- end
- end
-end