diff options
Diffstat (limited to 'lib/gitlab/database/migration_helpers/convert_to_bigint.rb')
-rw-r--r-- | lib/gitlab/database/migration_helpers/convert_to_bigint.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/gitlab/database/migration_helpers/convert_to_bigint.rb b/lib/gitlab/database/migration_helpers/convert_to_bigint.rb new file mode 100644 index 00000000000..63928d7dc09 --- /dev/null +++ b/lib/gitlab/database/migration_helpers/convert_to_bigint.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +module Gitlab + module Database + module MigrationHelpers + module ConvertToBigint + # This helper is extracted for the purpose of + # https://gitlab.com/gitlab-org/gitlab/-/issues/392815 + # so that we can test all combinations just once, + # and simplify migration tests. + # + # Once we are done with the PK conversions we can remove this. + def com_or_dev_or_test_but_not_jh? + return true if Gitlab.dev_or_test_env? + + Gitlab.com? && !Gitlab.jh? + end + end + end + end +end |