debian-mirror-gitlab/lib/gitlab/background_migration/backfill_internal_on_notes.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
460 B
Ruby
Raw Normal View History

2022-11-25 23:54:43 +05:30
# frozen_string_literal: true
module Gitlab
module BackgroundMigration
# This syncs the data to `internal` from `confidential` as we rename the column.
class BackfillInternalOnNotes < BatchedMigrationJob
scope_to -> (relation) { relation.where(confidential: true) }
2023-01-13 00:05:48 +05:30
operation_name :update_all
2022-11-25 23:54:43 +05:30
def perform
2023-01-13 00:05:48 +05:30
each_sub_batch do |sub_batch|
2022-11-25 23:54:43 +05:30
sub_batch.update_all(internal: true)
end
end
end
end
end