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

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

class BackfillCiBuildsMetadataIdForBigintConversion < ActiveRecord::Migration[6.1]
  disable_ddl_transaction!

  include Gitlab::Database::MigrationHelpers

  TABLE = :ci_builds_metadata
  COLUMN = :id

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

  def down
    revert_backfill_conversion_of_integer_to_bigint TABLE, COLUMN
  end
end