Skip to content

Commit

Permalink
fix: only compare major version of pgsql
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
  • Loading branch information
joshtrichards committed May 10, 2024
1 parent 3ce8c6d commit 2e94ec8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/settings/lib/SetupChecks/SupportedDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ public function run(): SetupResult {
$row = $result->fetch();
$version = $row['server_version'];
$versionlc = strtolower($version);
// we only care about X not X.Y or X.Y.Z differences
[$major, ] = explode('.', $versionlc);
$versionlc = $major;
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));
}
Expand Down

0 comments on commit 2e94ec8

Please sign in to comment.