add indices on blobId

This commit is contained in:
zadam
2023-07-27 21:40:47 +02:00
parent 5b0f487f3f
commit 527718eff7
6 changed files with 449 additions and 647 deletions

View File

@@ -156,13 +156,13 @@ class AbstractBeccaEntity {
this.save();
if (newBlobId !== oldBlobId) {
this.#deleteBlobIfNoteUsed(oldBlobId);
this.#deleteBlobIfNotUsed(oldBlobId);
}
}
});
}
#deleteBlobIfNoteUsed(blobId) {
#deleteBlobIfNotUsed(blobId) {
if (sql.getValue("SELECT 1 FROM notes WHERE blobId = ? LIMIT 1", [blobId])) {
return;
}