Skip to content

Commit 2e94ec8

Browse files
committed
fix: only compare major version of pgsql
Signed-off-by: Josh Richards <[email protected]>
1 parent 3ce8c6d commit 2e94ec8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

apps/settings/lib/SetupChecks/SupportedDatabase.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ public function run(): SetupResult {
8080
$row = $result->fetch();
8181
$version = $row['server_version'];
8282
$versionlc = strtolower($version);
83+
// we only care about X not X.Y or X.Y.Z differences
84+
[$major, ] = explode('.', $versionlc);
85+
$versionlc = $major;
8386
if (version_compare($versionlc, '12', '<') || version_compare($versionlc, '16', '>')) {
8487
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));
8588
}

0 commit comments

Comments
 (0)