summaryrefslogtreecommitdiff
path: root/lib/gitlab/background_migration/remove_self_managed_wiki_notes.rb
blob: a284c04d4f5ac6d5cb1d070a5296fc00aba0666b (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
      operation_name :delete_all

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