Module: Gitlab::ConfigChecker::ExternalDatabaseChecker

Extended by:
ExternalDatabaseChecker
Included in:
ExternalDatabaseChecker
Defined in:
lib/gitlab/config_checker/external_database_checker.rb

Instance Method Summary collapse

Instance Method Details

#checkObject


8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/gitlab/config_checker/external_database_checker.rb', line 8

def check
  return [] if ApplicationRecord.database.postgresql_minimum_supported_version?

  [
    {
      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>'
                                                              }
    }
  ]
end