fix: refactor postgresql check to match mariadb/mysql

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
pull/45241/head
Josh Richards 2024-05-10 08:28:05 +07:00 committed by Josh
parent f486be8da1
commit 3ce8c6d0db
1 changed files with 2 additions and 1 deletions

@ -79,7 +79,8 @@ class SupportedDatabase implements ISetupCheck {
$result->execute();
$row = $result->fetch();
$version = $row['server_version'];
if (version_compare(strtolower($version), '12', '<') || version_compare(strtolower($version, '16', '>') {
$versionlc = strtolower($version);
if (version_compare($versionlc, '12', '<') || version_compare($versionlc, '16', '>')) {
return SetupResult::warning($this->l10n->t('PostgreSQL version "%s" detected. PostgreSQL >=12 and <=16 is suggested for best performance, stability and functionality with this version of Nextcloud.', $version));
}
} elseif ($databasePlatform instanceof OraclePlatform) {