diff options
author | Joas Schilling <coding@schilljs.com> | 2022-10-13 10:36:05 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-10-13 10:36:05 +0200 |
commit | 4d98128e9a4c170efb7ae1e5e063df14844964a2 (patch) | |
tree | f23e52262b54cf1686fcdbcac4b8f389f6373c34 /core/Migrations | |
parent | b4f6329a8390650f21119893261b69b965ae795e (diff) | |
download | nextcloud-server-4d98128e9a4c170efb7ae1e5e063df14844964a2.tar.gz nextcloud-server-4d98128e9a4c170efb7ae1e5e063df14844964a2.zip |
Fix migration parameter handling
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/Migrations')
-rw-r--r-- | core/Migrations/Version25000Date20221007010957.php | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/core/Migrations/Version25000Date20221007010957.php b/core/Migrations/Version25000Date20221007010957.php index 18d769ab735..21c62acae21 100644 --- a/core/Migrations/Version25000Date20221007010957.php +++ b/core/Migrations/Version25000Date20221007010957.php @@ -51,23 +51,22 @@ class Version25000Date20221007010957 extends SimpleMigrationStep { */ public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void { $cleanUpQuery = $this->connection->getQueryBuilder(); - - $orExpr = $cleanUpQuery->expr()->orX( - $cleanUpQuery->expr()->eq('configkey', $cleanUpQuery->createNamedParameter('background')), - $cleanUpQuery->expr()->eq('configkey', $cleanUpQuery->createNamedParameter('backgroundVersion')), - ); - $cleanUpQuery->delete('preferences') ->where($cleanUpQuery->expr()->eq('appid', $cleanUpQuery->createNamedParameter('theming'))) - ->andWhere($orExpr); + ->andWhere($cleanUpQuery->expr()->orX( + $cleanUpQuery->expr()->eq('configkey', $cleanUpQuery->createNamedParameter('background')), + $cleanUpQuery->expr()->eq('configkey', $cleanUpQuery->createNamedParameter('backgroundVersion')), + )); $cleanUpQuery->executeStatement(); $updateQuery = $this->connection->getQueryBuilder(); $updateQuery->update('preferences') ->set('appid', $updateQuery->createNamedParameter('theming')) ->where($updateQuery->expr()->eq('appid', $updateQuery->createNamedParameter('dashboard'))) - ->andWhere($orExpr); - + ->andWhere($updateQuery->expr()->orX( + $updateQuery->expr()->eq('configkey', $updateQuery->createNamedParameter('background')), + $updateQuery->expr()->eq('configkey', $updateQuery->createNamedParameter('backgroundVersion')), + )); $updateQuery->executeStatement(); } } |