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

20200106071113_update_fingerprint_sha256_within_keys.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 06f5c8810068815825e7f3258fe39f4f7ad6da4c (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 UpdateFingerprintSha256WithinKeys < ActiveRecord::Migration[5.0]
  include Gitlab::Database::MigrationHelpers

  class Key < ActiveRecord::Base
    include EachBatch

    self.table_name = 'keys'
    self.inheritance_column = :_type_disabled
  end

  disable_ddl_transaction!

  def up
    queue_background_migration_jobs_by_range_at_intervals(Key, 'MigrateFingerprintSha256WithinKeys', 5.minutes)
  end

  def down
    # no-op
  end
end