diff options
author | Git'Fellow <12234510+solracsf@users.noreply.github.com> | 2023-08-13 00:15:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-13 00:15:18 +0200 |
commit | 9237fba27b6772e73e04f445070376b61536f94b (patch) | |
tree | be865f552d77187a16ab7457b0f3c76141ada224 /lib/private/legacy | |
parent | 50d1f530cbf019f322eb9a8400a2b2830b400c54 (diff) | |
download | nextcloud-server-9237fba27b6772e73e04f445070376b61536f94b.tar.gz nextcloud-server-9237fba27b6772e73e04f445070376b61536f94b.zip |
Remove check for very old PGsql
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Diffstat (limited to 'lib/private/legacy')
-rw-r--r-- | lib/private/legacy/OC_Util.php | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index 63599ff833b..dba0f4e6ab7 100644 --- a/lib/private/legacy/OC_Util.php +++ b/lib/private/legacy/OC_Util.php @@ -715,8 +715,6 @@ class OC_Util { } } - $errors = array_merge($errors, self::checkDatabaseVersion()); - // Cache the result of this function \OC::$server->getSession()->set('checkServer_succeeded', count($errors) == 0); @@ -724,43 +722,6 @@ class OC_Util { } /** - * Check the database version - * - * @return array errors array - */ - public static function checkDatabaseVersion() { - $l = \OC::$server->getL10N('lib'); - $errors = []; - $dbType = \OC::$server->getSystemConfig()->getValue('dbtype', 'sqlite'); - if ($dbType === 'pgsql') { - // check PostgreSQL version - // TODO latest postgresql 8 released was 8 years ago, maybe remove the - // check completely? - try { - /** @var IDBConnection $connection */ - $connection = \OC::$server->get(IDBConnection::class); - $result = $connection->executeQuery('SHOW SERVER_VERSION'); - $data = $result->fetch(); - $result->closeCursor(); - if (isset($data['server_version'])) { - $version = $data['server_version']; - if (version_compare($version, '9.0.0', '<')) { - $errors[] = [ - 'error' => $l->t('PostgreSQL >= 9 required.'), - 'hint' => $l->t('Please upgrade your database version.') - ]; - } - } - } catch (\Doctrine\DBAL\Exception $e) { - $logger = \OC::$server->getLogger(); - $logger->warning('Error occurred while checking PostgreSQL version, assuming >= 9'); - $logger->logException($e); - } - } - return $errors; - } - - /** * Check for correct file permissions of data directory * * @param string $dataDirectory |