From 02108c446554e4616bde5926e1a4d09804af6119 Mon Sep 17 00:00:00 2001 From: Josh Date: Tue, 10 Feb 2026 13:44:51 -0500 Subject: [PATCH 1/2] fix(setup): prevent unnecessary mime migrations on new installs Avoids running the repairs for prior versions (that are otherwise a no-op) and also avoids the misleading/confusing setup check warning on new installations about "One oe more mimetype migrations are available [...]". Signed-off-by: Josh --- lib/private/Setup.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/private/Setup.php b/lib/private/Setup.php index efdbd1cfd6c57..8536321677a4d 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -508,6 +508,10 @@ public function install(array $options, ?IOutput $output = null): array { } } + // Seed the mimetype_version for future mimetype repair jobs with the install-time version + $serverVersion = $config->getSystemValueString('version', '0.0.0'); + $appConfig->setValueString('files', 'mimetype_version', $serverVersion); + // Dispatch installation completed event $adminUsername = !$disableAdminUser ? ($options['adminlogin'] ?? null) : null; $adminEmail = !empty($options['adminemail']) ? $options['adminemail'] : null; From 70266d1b58b2300bdd69aeedcbc19c3fd17ed231 Mon Sep 17 00:00:00 2001 From: Josh Date: Tue, 10 Feb 2026 14:02:39 -0500 Subject: [PATCH 2/2] fix(Repair): make sure --- lib/private/Repair/RepairMimeTypes.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php index a9ef95b50c28e..cd8c610c3b037 100644 --- a/lib/private/Repair/RepairMimeTypes.php +++ b/lib/private/Repair/RepairMimeTypes.php @@ -389,13 +389,11 @@ public function migrationsAvailable(): bool { * Get the current mimetype version */ private function getMimeTypeVersion(): string { - $serverVersion = $this->config->getSystemValueString('version', '0.0.0'); - // 29.0.0.10 is the last version with a mimetype migration before it was moved to a separate version number - if (version_compare($serverVersion, '29.0.0.10', '>')) { - return $this->appConfig->getValueString('files', 'mimetype_version', '29.0.0.10'); - } - - return $serverVersion; + // 29.0.0.10 is the last version with a mimetype migration before tracking was moved to mimetype_version. + // However since it's possible that someone may have upgraded without running expensive repair steps prior + // to 29.0.0.10, we assume none have been ran (once). This is acceptable since (a) only happens when expensive + // repair steps are explicitly requested; (b) only happens once *ever* in a given environment. + return $this->appConfig->getValueString('files', 'mimetype_version', '0.0.0'); } /**