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

remove_self_managed_wiki_notes.rb « background_migration « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5b1d630bb032f5988259268224700bdc9f553d3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

module Gitlab
  module BackgroundMigration
    # Removes obsolete wiki notes
    class RemoveSelfManagedWikiNotes < BatchedMigrationJob
      def perform
        each_sub_batch(
          operation_name: :delete_all
        ) do |sub_batch|
          sub_batch.where(noteable_type: 'Wiki').delete_all
        end
      end
    end
  end
end