summaryrefslogtreecommitdiff
path: root/lib/gitlab/background_migration/remove_self_managed_wiki_notes.rb
blob: cf3897208b89d3a6a6b4b87ae8ed0b04d3c4a8e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module Gitlab
  module BackgroundMigration
    # Removes obsolete wiki notes
    class RemoveSelfManagedWikiNotes < BatchedMigrationJob
      operation_name :delete_all
      feature_category :database

      def perform
        each_sub_batch do |sub_batch|
          sub_batch.where(noteable_type: 'Wiki').delete_all
        end
      end
    end
  end
end