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

20230613192703_ensure_ci_build_needs_big_int_backfill_is_finished_for_self_hosts.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7616944567e1ea43d3be94a5479f59482c2c0ab6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true

class EnsureCiBuildNeedsBigIntBackfillIsFinishedForSelfHosts < Gitlab::Database::Migration[2.1]
  include Gitlab::Database::MigrationHelpers::ConvertToBigint

  disable_ddl_transaction!

  restrict_gitlab_migration gitlab_schema: :gitlab_ci

  TABLE_NAME = 'ci_build_needs'

  def up
    ensure_batched_background_migration_is_finished(
      job_class_name: 'CopyColumnUsingBackgroundMigrationJob',
      table_name: TABLE_NAME,
      column_name: 'id',
      job_arguments: [['id'], ['id_convert_to_bigint']]
    )
  end

  def down
    # no-op
  end
end