debian-mirror-gitlab/db/post_migrate/20210519132129_backfill_ci_builds_metadata_for_bigint_conversion.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
440 B
Ruby
Raw Normal View History

2021-09-04 01:27:46 +05:30
# frozen_string_literal: true
class BackfillCiBuildsMetadataForBigintConversion < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
2022-07-23 23:45:48 +05:30
disable_ddl_transaction!
2021-09-04 01:27:46 +05:30
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