summaryrefslogtreecommitdiff
path: root/db/post_migrate/20210430121542_backfill_ci_build_trace_sections_for_bigint_conversion.rb
blob: f832b06d43919ffbdf281f99b0df30eed788c7fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

class BackfillCiBuildTraceSectionsForBigintConversion < ActiveRecord::Migration[6.0]
  include Gitlab::Database::MigrationHelpers

  TABLE = :ci_build_trace_sections
  COLUMN = :build_id

  def up
    backfill_conversion_of_integer_to_bigint TABLE, COLUMN, batch_size: 15000, sub_batch_size: 100, primary_key: COLUMN
  end

  def down
    revert_backfill_conversion_of_integer_to_bigint TABLE, COLUMN, primary_key: COLUMN
  end
end