diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/Migrations/Version25000Date20221007010957.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/core/Migrations/Version25000Date20221007010957.php b/core/Migrations/Version25000Date20221007010957.php index ac33b608ace..5e4a9854382 100644 --- a/core/Migrations/Version25000Date20221007010957.php +++ b/core/Migrations/Version25000Date20221007010957.php @@ -52,13 +52,19 @@ class Version25000Date20221007010957 extends SimpleMigrationStep { public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void { $qb = $this->connection->getQueryBuilder(); + $orExpr = $qb->expr()->orX( + $qb->expr()->eq('configkey', $qb->createNamedParameter('background')), + $qb->expr()->eq('configkey', $qb->createNamedParameter('backgroundVersion')), + ); + + $qb->delete('preferences') + ->where($qb->expr()->eq('appid', $qb->createNamedParameter('theming'))) + ->andWhere($orExpr); + $qb->update('preferences') ->set('appid', $qb->createNamedParameter('theming')) ->where($qb->expr()->eq('appid', $qb->createNamedParameter('dashboard'))) - ->andWhere($qb->expr()->orX( - $qb->expr()->eq('configkey', $qb->createNamedParameter('background')), - $qb->expr()->eq('configkey', $qb->createNamedParameter('backgroundVersion')) - )); + ->andWhere($orExpr); $qb->executeStatement(); } |