debian-mirror-gitlab/db/post_migrate/20230321163547_cleanup_conversion_big_int_ci_build_needs.rb
2023-06-20 00:43:36 +05:30

26 lines
493 B
Ruby

# 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