From ee3c8d00bd8c17201da0b116a9b3b276804b855f Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 4 May 2023 22:29:43 +0000 Subject: Add latest changes from gitlab-org/gitlab@15-11-stable-ee --- ...20230321163547_cleanup_conversion_big_int_ci_build_needs.rb | 10 ++++++++++ ...1153310_cleanup_bigint_conversion_for_sent_notifications.rb | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/db/post_migrate/20230321163547_cleanup_conversion_big_int_ci_build_needs.rb b/db/post_migrate/20230321163547_cleanup_conversion_big_int_ci_build_needs.rb index 4812cb2deca..680a496e639 100644 --- a/db/post_migrate/20230321163547_cleanup_conversion_big_int_ci_build_needs.rb +++ b/db/post_migrate/20230321163547_cleanup_conversion_big_int_ci_build_needs.rb @@ -1,15 +1,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 diff --git a/db/post_migrate/20230411153310_cleanup_bigint_conversion_for_sent_notifications.rb b/db/post_migrate/20230411153310_cleanup_bigint_conversion_for_sent_notifications.rb index e5f690a0a5a..567fe4fb3d2 100644 --- a/db/post_migrate/20230411153310_cleanup_bigint_conversion_for_sent_notifications.rb +++ b/db/post_migrate/20230411153310_cleanup_bigint_conversion_for_sent_notifications.rb @@ -1,16 +1,26 @@ # frozen_string_literal: true class CleanupBigintConversionForSentNotifications < Gitlab::Database::Migration[2.1] + include Gitlab::Database::MigrationHelpers::ConvertToBigint + enable_lock_retries! TABLE = :sent_notifications COLUMNS = [:id] def up + return unless should_run? + cleanup_conversion_of_integer_to_bigint(TABLE, COLUMNS) end def down + return unless should_run? + restore_conversion_of_integer_to_bigint(TABLE, COLUMNS) end + + def should_run? + com_or_dev_or_test_but_not_jh? + end end -- cgit v1.2.1