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/20200128133510_cleanup_empty_commit_user_mentions.rb')
-rw-r--r--db/post_migrate/20200128133510_cleanup_empty_commit_user_mentions.rb28
1 files changed, 0 insertions, 28 deletions
diff --git a/db/post_migrate/20200128133510_cleanup_empty_commit_user_mentions.rb b/db/post_migrate/20200128133510_cleanup_empty_commit_user_mentions.rb
deleted file mode 100644
index 362aa3a60f7..00000000000
--- a/db/post_migrate/20200128133510_cleanup_empty_commit_user_mentions.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupEmptyCommitUserMentions < ActiveRecord::Migration[5.2]
- DOWNTIME = false
- BATCH_SIZE = 10_000
-
- class CommitUserMention < ActiveRecord::Base
- include EachBatch
-
- self.table_name = 'commit_user_mentions'
- end
-
- def up
- # cleanup commit user mentions with no actual mentions,
- # re https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24586#note_285982468
- CommitUserMention
- .where(mentioned_users_ids: nil)
- .where(mentioned_groups_ids: nil)
- .where(mentioned_projects_ids: nil)
- .each_batch(of: BATCH_SIZE) do |batch|
- batch.delete_all
- end
- end
-
- def down
- # no-op
- end
-end