diff --git a/apps/theming/lib/Migration/Version2006Date20240905111627.php b/apps/theming/lib/Migration/Version2006Date20240905111627.php index 92b3c0e4cfadf..6f9247aa2c54a 100644 --- a/apps/theming/lib/Migration/Version2006Date20240905111627.php +++ b/apps/theming/lib/Migration/Version2006Date20240905111627.php @@ -83,7 +83,12 @@ private function restoreUserColors(IOutput $output): void { ->set('configkey', $qb->createNamedParameter('primary_color')) ->where($qb->expr()->eq('appid', $qb->createNamedParameter(Application::APP_ID))) ->andWhere($qb->expr()->eq('configkey', $qb->createNamedParameter('background_color'))); - $qb->executeStatement(); - $output->info('Primary color of users restored'); + + try { + $qb->executeStatement(); + $output->info('Primary color of users restored'); + } catch (\Exception $exception) { + $output->warning('Cannot migrate background colors: Some users already configured the background color'); + } } }