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

20220204194347_encrypt_integration_properties.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 82dd3a05e1d0950f7202108dbbab574f8c248eeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

class EncryptIntegrationProperties < Gitlab::Database::Migration[1.0]
  disable_ddl_transaction!
  MIGRATION = 'EncryptIntegrationProperties'
  BATCH_SIZE = 1_000
  INTERVAL = 2.minutes.to_i

  def up
    queue_background_migration_jobs_by_range_at_intervals(
      define_batchable_model('integrations').all,
      MIGRATION,
      INTERVAL,
      track_jobs: true,
      batch_size: BATCH_SIZE
    )
  end

  def down
    # this migration is not reversible
  end
end