2021-05-25 18:10:42 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class BackfillCiBuildsMetadataForBigintConversion < ActiveRecord::Migration[6.0]
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
2022-05-19 12:08:42 +00:00
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2021-05-25 18:10:42 +00:00
|
|
|
TABLE = :ci_builds_metadata
|
|
|
|
COLUMN = :build_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
|