Skip to content

Commit a6d63b0

Browse files
committed
fix(setupChecks): update db version checks
Signed-off-by: Josh Richards <[email protected]>
1 parent 4e7b62a commit a6d63b0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

apps/settings/lib/SetupChecks/SupportedDatabase.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,21 @@ public function run(): SetupResult {
6464
$versionlc = strtolower($version);
6565

6666
if (str_contains($versionlc, 'mariadb')) {
67-
if (version_compare($versionlc, '10.2', '<')) {
68-
return SetupResult::warning($this->l10n->t('MariaDB version "%s" is used. Nextcloud 21 and higher do not support this version and require MariaDB 10.2 or higher.', $version));
67+
if (version_compare($versionlc, '10.3', '<') || version_compare($versionlc, '10.11', '>')) {
68+
return SetupResult::warning($this->l10n->t('MariaDB version "%s" detected. MariaDB >=10.3 and <=10.11 is suggested for best performance, stability and functionality with this version of Nextcloud.', $version));
6969
}
7070
} else {
71-
if (version_compare($versionlc, '8', '<')) {
72-
return SetupResult::warning($this->l10n->t('MySQL version "%s" is used. Nextcloud 21 and higher do not support this version and require MySQL 8.0 or MariaDB 10.2 or higher.', $version));
71+
if (version_compare($versionlc, '8.0', '<') || version_compare($versionlc, '8.3', '>')) {
72+
return SetupResult::warning($this->l10n->t('MySQL version "%s" detected. MySQL >=8.0 and <=8.3 is suggested for best performance, stability and functionality with this version of Nextcloud.', $version));
7373
}
7474
}
7575
} elseif ($databasePlatform instanceof PostgreSQLPlatform) {
7676
$result = $this->connection->prepare('SHOW server_version;');
7777
$result->execute();
7878
$row = $result->fetch();
7979
$version = $row['server_version'];
80-
if (version_compare(strtolower($version), '9.6', '<')) {
81-
return SetupResult::warning($this->l10n->t('PostgreSQL version "%s" is used. Nextcloud 21 and higher do not support this version and require PostgreSQL 9.6 or higher.', $version));
80+
if (version_compare(strtolower($version), '12', '<') || version_compare(strtolower($version, '16', '>') {
81+
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));
8282
}
8383
} elseif ($databasePlatform instanceof OraclePlatform) {
8484
$version = 'Oracle';

0 commit comments

Comments
 (0)