diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-12 21:07:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-12 21:07:54 +0300 |
commit | 742a7f35acd8cf2150bf322e4b385ea104d74a05 (patch) | |
tree | 3ca173ce1fa5549f49bc41fc9c52142d616bd943 /lib/gitlab/config_checker | |
parent | 8ff63012e9b7e3dc2279e636868af9a438d1fa93 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/config_checker')
-rw-r--r-- | lib/gitlab/config_checker/external_database_checker.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/gitlab/config_checker/external_database_checker.rb b/lib/gitlab/config_checker/external_database_checker.rb new file mode 100644 index 00000000000..795082a10a0 --- /dev/null +++ b/lib/gitlab/config_checker/external_database_checker.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +module Gitlab + module ConfigChecker + module ExternalDatabaseChecker + extend self + + # DB is considered deprecated if it is below version 11 + def db_version_deprecated? + Gitlab::Database.version.to_f < 11 + end + + def check + return [] unless db_version_deprecated? + + [ + { + type: 'warning', + message: _('Note that PostgreSQL 11 will become the minimum required PostgreSQL version in GitLab 13.0 (May 2020). '\ + 'PostgreSQL 9.6 and PostgreSQL 10 will no longer be supported in GitLab 13.0. '\ + 'Please consider upgrading your PostgreSQL version (%{db_version}) soon.') % { db_version: Gitlab::Database.version.to_s } + } + ] + end + end + end +end |