Skip to content

Commit 43da5b0

Browse files
author
Simon Spannagel
committed
RepairStep for unencrypted size: make DB query more efficient
Signed-off-by: Simon Spannagel <simonspa@kth.se>
1 parent 112bbd2 commit 43da5b0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/private/Repair/RepairUnencryptedSize.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ public function run(IOutput $output) {
4545
$update = $this->connection->getQueryBuilder();
4646
$update->update('filecache')
4747
->set('unencrypted_size', "0")
48-
->where($update->expr()->eq('encrypted', "0", IQueryBuilder::PARAM_INT))
49-
->andWhere($update->expr()->neq('unencrypted_size', "0", IQueryBuilder::PARAM_INT));
48+
->where($update->expr()->gt('unencrypted_size', "0", IQueryBuilder::PARAM_INT))
49+
->andWhere($update->expr()->eq('encrypted', "0", IQueryBuilder::PARAM_INT));
5050

5151
if ($update->execute()) {
5252
$output->info('Fixed file size of unencrypted files');

0 commit comments

Comments
 (0)