summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-04 22:29:43 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-04 22:29:43 +0000
commitee3c8d00bd8c17201da0b116a9b3b276804b855f (patch)
treee5f69a4c4964e983145b5c05e86699a904989350
parentd0338479aa58e89b33a367daad2a3e47c3dc9823 (diff)
downloadgitlab-ce-ee3c8d00bd8c17201da0b116a9b3b276804b855f.tar.gz
Add latest changes from gitlab-org/gitlab@15-11-stable-ee
-rw-r--r--db/post_migrate/20230321163547_cleanup_conversion_big_int_ci_build_needs.rb10
-rw-r--r--db/post_migrate/20230411153310_cleanup_bigint_conversion_for_sent_notifications.rb10
2 files changed, 20 insertions, 0 deletions
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