2020-05-24 23:13:21 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module ConfigChecker
|
|
|
|
module ExternalDatabaseChecker
|
|
|
|
extend self
|
|
|
|
|
|
|
|
def check
|
2021-12-11 22:18:48 +05:30
|
|
|
return [] if ApplicationRecord.database.postgresql_minimum_supported_version?
|
2020-07-28 23:09:34 +05:30
|
|
|
|
2020-10-24 23:57:45 +05:30
|
|
|
[
|
|
|
|
{
|
|
|
|
type: 'warning',
|
|
|
|
message: _('You are using PostgreSQL %{pg_version_current}, but PostgreSQL ' \
|
|
|
|
'%{pg_version_minimum} is required for this version of GitLab. ' \
|
|
|
|
'Please upgrade your environment to a supported PostgreSQL version, ' \
|
|
|
|
'see %{pg_requirements_url} for details.') % {
|
2021-12-11 22:18:48 +05:30
|
|
|
pg_version_current: ApplicationRecord.database.version,
|
2020-10-24 23:57:45 +05:30
|
|
|
pg_version_minimum: Gitlab::Database::MINIMUM_POSTGRES_VERSION,
|
|
|
|
pg_requirements_url: '<a href="https://docs.gitlab.com/ee/install/requirements.html#database">database requirements</a>'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2020-05-24 23:13:21 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|