aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2022-10-13 00:19:00 +0000
committerVincent Petry (Rebase PR Action) <PVince81@users.noreply.github.com>2022-10-13 08:31:33 +0000
commit7f5ef4dcf751bcd5f17dddf140d349d645b24cba (patch)
tree1d9e67b4a7b4a581b964977a3a8bebc85c654fe7 /core
parent7599cbb529b08b952f0968b2d3b6c7e48b1ce7a6 (diff)
downloadnextcloud-server-7f5ef4dcf751bcd5f17dddf140d349d645b24cba.tar.gz
nextcloud-server-7f5ef4dcf751bcd5f17dddf140d349d645b24cba.zip
Delete theming background preferences
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'core')
-rw-r--r--core/Migrations/Version25000Date20221007010957.php14
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();
}