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

backfill_internal_on_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: fe05b4ec3c118e9396360ed206812e4182fd41b0 (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
    # This syncs the data to `internal` from `confidential` as we rename the column.
    class BackfillInternalOnNotes < BatchedMigrationJob
      scope_to -> (relation) { relation.where(confidential: true) }
      operation_name :update_all

      def perform
        each_sub_batch do |sub_batch|
          sub_batch.update_all(internal: true)
        end
      end
    end
  end
end