Skip to content

Commit

Permalink
RepairStep for unencrypted size: make DB query more efficient
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Spannagel <simonspa@kth.se>
  • Loading branch information
Simon Spannagel committed Jan 29, 2023
1 parent 112bbd2 commit 43da5b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/Repair/RepairUnencryptedSize.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public function run(IOutput $output) {
$update = $this->connection->getQueryBuilder();
$update->update('filecache')
->set('unencrypted_size', "0")
->where($update->expr()->eq('encrypted', "0", IQueryBuilder::PARAM_INT))
->andWhere($update->expr()->neq('unencrypted_size', "0", IQueryBuilder::PARAM_INT));
->where($update->expr()->gt('unencrypted_size', "0", IQueryBuilder::PARAM_INT))
->andWhere($update->expr()->eq('encrypted', "0", IQueryBuilder::PARAM_INT));

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

0 comments on commit 43da5b0

Please sign in to comment.