2020-05-12 14:07:54 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module ConfigChecker
|
|
|
|
module ExternalDatabaseChecker
|
|
|
|
extend self
|
|
|
|
|
|
|
|
def check
|
2021-11-15 10:10:57 -05:00
|
|
|
return [] if ApplicationRecord.database.postgresql_minimum_supported_version?
|
2020-08-20 20:10:44 -04:00
|
|
|
|
|
|
|
[
|
|
|
|
{
|
|
|
|
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-11-15 10:10:57 -05:00
|
|
|
pg_version_current: ApplicationRecord.database.version,
|
2020-08-20 20:10:44 -04:00
|
|
|
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-08-17 08:10:12 -04:00
|
|
|
}
|
2020-08-20 20:10:44 -04:00
|
|
|
]
|
2020-05-12 14:07:54 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|