debian-mirror-gitlab/lib/gitlab/background_migration/remove_self_managed_wiki_notes.rb
2022-10-11 01:57:18 +05:30

16 lines
372 B
Ruby

# 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