From c7c962433651f32a425dc4200c77829b0a8142c9 Mon Sep 17 00:00:00 2001 From: kyteinsky Date: Thu, 18 Jun 2026 18:23:09 +0530 Subject: [PATCH 1/2] fix: skip repair RemoveBrokenProperties if already run Signed-off-by: kyteinsky --- lib/private/Repair/RemoveBrokenProperties.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/private/Repair/RemoveBrokenProperties.php b/lib/private/Repair/RemoveBrokenProperties.php index b9452d77addbe..8ea048b98912c 100644 --- a/lib/private/Repair/RemoveBrokenProperties.php +++ b/lib/private/Repair/RemoveBrokenProperties.php @@ -9,6 +9,7 @@ namespace OC\Repair; +use OCP\AppFramework\Services\IAppConfig; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; use OCP\Migration\IOutput; @@ -18,6 +19,7 @@ class RemoveBrokenProperties implements IRepairStep { public function __construct( private readonly IDBConnection $db, + private readonly IAppConfig $appConfig, ) { } @@ -28,6 +30,10 @@ public function getName(): string { #[Override] public function run(IOutput $output): void { + if ($this->appConfig->getAppValueBool('repair_removed_broken_properties')) { + return; + } + // retrieve all object properties $qb = $this->db->getQueryBuilder(); $qb->select('id', 'propertyvalue') @@ -56,6 +62,8 @@ public function run(IOutput $output): void { $qb->executeStatement(); } $total = count($brokenIds); + + $this->appConfig->setAppValueBool('repair_removed_broken_properties', true); $output->info("$total broken object properties removed"); } } From f119f8c85811a8e38890bfae199e7ff85dc09890 Mon Sep 17 00:00:00 2001 From: kyteinsky Date: Fri, 19 Jun 2026 13:37:32 +0530 Subject: [PATCH 2/2] fix: use OCP-IAppConfig Signed-off-by: kyteinsky --- lib/private/Repair/RemoveBrokenProperties.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/private/Repair/RemoveBrokenProperties.php b/lib/private/Repair/RemoveBrokenProperties.php index 8ea048b98912c..a5458a042ef54 100644 --- a/lib/private/Repair/RemoveBrokenProperties.php +++ b/lib/private/Repair/RemoveBrokenProperties.php @@ -9,8 +9,8 @@ namespace OC\Repair; -use OCP\AppFramework\Services\IAppConfig; use OCP\DB\QueryBuilder\IQueryBuilder; +use OCP\IAppConfig; use OCP\IDBConnection; use OCP\Migration\IOutput; use OCP\Migration\IRepairStep; @@ -30,7 +30,7 @@ public function getName(): string { #[Override] public function run(IOutput $output): void { - if ($this->appConfig->getAppValueBool('repair_removed_broken_properties')) { + if ($this->appConfig->getValueBool('core', 'repair_removed_broken_properties', lazy: true)) { return; } @@ -63,7 +63,7 @@ public function run(IOutput $output): void { } $total = count($brokenIds); - $this->appConfig->setAppValueBool('repair_removed_broken_properties', true); + $this->appConfig->setValueBool('core', 'repair_removed_broken_properties', true, lazy: true); $output->info("$total broken object properties removed"); } }