Skip to content

Commit

Permalink
Fix double bracket in optimised query
Browse files Browse the repository at this point in the history
  • Loading branch information
SimplyBoo6 committed Apr 26, 2024
1 parent 7e9da1c commit 975d17a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/database/sqlite/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,14 +392,14 @@ export class SqliteConnector extends Database {

public resetClones(): Promise<void> {
this.db.exec(
'UPDATE `media` SET `clones` = NULL WHERE `hash` IN ((SELECT `hash` FROM `media` WHERE `clones` IS NOT NULL))',
'UPDATE `media` SET `clones` = NULL WHERE `hash` IN (SELECT `hash` FROM `media` WHERE `clones` IS NOT NULL)',
);
return Promise.resolve();
}

public async resetAutoTags(): Promise<void> {
this.db.exec(
'UPDATE `media` SET `auto_tags` = NULL WHERE `hash` IN ((SELECT `hash` FROM `media` WHERE `auto_tags` IS NOT NULL))',
'UPDATE `media` SET `auto_tags` = NULL WHERE `hash` IN (SELECT `hash` FROM `media` WHERE `auto_tags` IS NOT NULL)',
);
return Promise.resolve();
}
Expand Down

0 comments on commit 975d17a

Please sign in to comment.