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

20230321163547_cleanup_conversion_big_int_ci_build_needs.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 680a496e6392661e50e516e45e38eeff8e5a0d23 (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
25
# frozen_string_literal: true

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

  enable_lock_retries!

  TABLE = :ci_build_needs

  def up
    return unless should_run?

    cleanup_conversion_of_integer_to_bigint(TABLE, :id)
  end

  def down
    return unless should_run?

    restore_conversion_of_integer_to_bigint(TABLE, :id)
  end

  def should_run?
    com_or_dev_or_test_but_not_jh?
  end
end