Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-28 15:07:50 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-28 15:07:50 +0300
commiteb3a23aaaa99ef8ae08c7b440fad676e3c71a1af (patch)
treebb74f64f73f4a20d4b4e3443c3e7defd4733a78d /lib/gitlab/config_checker
parentf3cfb235c76426ce5a18003bb80ba625097bf1d0 (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.rb23
1 files changed, 15 insertions, 8 deletions
diff --git a/lib/gitlab/config_checker/external_database_checker.rb b/lib/gitlab/config_checker/external_database_checker.rb
index 54320b7ff9a..64950fb4eef 100644
--- a/lib/gitlab/config_checker/external_database_checker.rb
+++ b/lib/gitlab/config_checker/external_database_checker.rb
@@ -5,22 +5,29 @@ module Gitlab
module ExternalDatabaseChecker
extend self
+ PG_REQUIREMENTS_LINK =
+ '<a href="https://docs.gitlab.com/ee/install/requirements.html#database">database requirements</a>'
+
def check
- return [] if ApplicationRecord.database.postgresql_minimum_supported_version?
+ unsupported_database = Gitlab::Database
+ .database_base_models
+ .map { |_, model| Gitlab::Database::Reflection.new(model) }
+ .reject(&:postgresql_minimum_supported_version?)
- [
+ unsupported_database.map do |database|
{
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.') % {
- pg_version_current: ApplicationRecord.database.version,
- 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>'
- }
+ 'see %{pg_requirements_url} for details.') % \
+ {
+ pg_version_current: database.version,
+ pg_version_minimum: Gitlab::Database::MINIMUM_POSTGRES_VERSION,
+ pg_requirements_url: PG_REQUIREMENTS_LINK
+ }
}
- ]
+ end
end
end
end