mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 18:21:40 -04:00
Merge pull request #56767 from nextcloud/backport/56729/stable32
Some checks are pending
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Integration sqlite / changes (push) Waiting to run
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, --tags ~@large files_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, capabilities_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, collaboration_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, comments_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, dav_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, federation_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, file_conversions) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, files_reminders) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, filesdrop_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, ldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, openldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, openldap_numerical_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, remoteapi_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, routing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, setup_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, sharees_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, sharing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, theming_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, videoverification_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite-summary (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis (push) Waiting to run
Psalm static code analysis / static-code-analysis-security (push) Waiting to run
Psalm static code analysis / static-code-analysis-ocp (push) Waiting to run
Psalm static code analysis / static-code-analysis-ncu (push) Waiting to run
Some checks are pending
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Integration sqlite / changes (push) Waiting to run
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, --tags ~@large files_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, capabilities_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, collaboration_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, comments_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, dav_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, federation_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, file_conversions) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, files_reminders) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, filesdrop_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, ldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, openldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, openldap_numerical_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, remoteapi_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, routing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, setup_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, sharees_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, sharing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, theming_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, videoverification_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite-summary (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis (push) Waiting to run
Psalm static code analysis / static-code-analysis-security (push) Waiting to run
Psalm static code analysis / static-code-analysis-ocp (push) Waiting to run
Psalm static code analysis / static-code-analysis-ncu (push) Waiting to run
[stable32] fix(oracle): Add a warning for Oracle 11
This commit is contained in:
commit
ae91cda87d
2 changed files with 36 additions and 5 deletions
|
|
@ -26,6 +26,8 @@ class SupportedDatabase implements ISetupCheck {
|
|||
private const MAX_MYSQL = '8.4';
|
||||
private const MIN_POSTGRES = '13';
|
||||
private const MAX_POSTGRES = '17';
|
||||
private const MIN_ORACLE = '12.2';
|
||||
private const MAX_ORACLE = '26';
|
||||
|
||||
public function __construct(
|
||||
private IL10N $l10n,
|
||||
|
|
@ -112,7 +114,29 @@ class SupportedDatabase implements ISetupCheck {
|
|||
);
|
||||
}
|
||||
} elseif ($databasePlatform instanceof OraclePlatform) {
|
||||
$version = 'Oracle';
|
||||
$result = $this->connection->executeQuery('SELECT VERSION FROM PRODUCT_COMPONENT_VERSION');
|
||||
$version = $result->fetchOne();
|
||||
$result->closeCursor();
|
||||
$versionLower = strtolower($version);
|
||||
// we only care about X.Y not X.Y.Z differences
|
||||
[$major, $minor, ] = explode('.', $versionLower);
|
||||
$versionConcern = $major . '.' . $minor;
|
||||
if (version_compare($versionConcern, self::MIN_ORACLE, '<') || version_compare($versionConcern, self::MAX_ORACLE, '>')) {
|
||||
$extendedWarning = '';
|
||||
if (version_compare($versionConcern, self::MIN_ORACLE, '<')) {
|
||||
$extendedWarning = "\n" . $this->l10n->t('Nextcloud %d does not support your current version, so be sure to update the database before updating your Nextcloud Server.', [33]);
|
||||
}
|
||||
return SetupResult::warning(
|
||||
$this->l10n->t(
|
||||
'Oracle version "%1$s" detected. Oracle >=%2$s and <=%3$s is suggested for best performance, stability and functionality with this version of Nextcloud.',
|
||||
[
|
||||
$version,
|
||||
self::MIN_ORACLE,
|
||||
self::MAX_ORACLE,
|
||||
])
|
||||
. $extendedWarning
|
||||
);
|
||||
}
|
||||
} elseif ($databasePlatform instanceof SqlitePlatform) {
|
||||
return SetupResult::warning(
|
||||
$this->l10n->t('SQLite is currently being used as the backend database. For larger installations we recommend that you switch to a different database backend. This is particularly recommended when using the desktop client for file synchronisation. To migrate to another database use the command line tool: "occ db:convert-type".'),
|
||||
|
|
|
|||
|
|
@ -41,11 +41,18 @@ class SupportedDatabaseTest extends TestCase {
|
|||
}
|
||||
|
||||
public function testPass(): void {
|
||||
$severities = [SetupResult::SUCCESS, SetupResult::INFO];
|
||||
if ($this->connection->getDatabaseProvider() === IDBConnection::PLATFORM_SQLITE) {
|
||||
/** SQlite always gets a warning */
|
||||
$this->assertEquals(SetupResult::WARNING, $this->check->run()->getSeverity());
|
||||
} else {
|
||||
$this->assertContains($this->check->run()->getSeverity(), [SetupResult::SUCCESS, SetupResult::INFO]);
|
||||
$severities = [SetupResult::WARNING];
|
||||
} elseif ($this->connection->getDatabaseProvider(true) === IDBConnection::PLATFORM_ORACLE) {
|
||||
$result = $this->connection->executeQuery('SELECT VERSION FROM PRODUCT_COMPONENT_VERSION');
|
||||
$version = $result->fetchOne();
|
||||
$result->closeCursor();
|
||||
if (str_starts_with($version, '11.')) {
|
||||
$severities = [SetupResult::WARNING];
|
||||
}
|
||||
}
|
||||
|
||||
$this->assertContains($this->check->run()->getSeverity(), $severities, 'Oracle 11 and SQLite expect a warning, other databases should be success or info only');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue