Commit 654fe56
fix(sync): exclude soft-deleted books from file sync
The books query in syncFiles was not filtering out soft-deleted records
(deleted_at IS NOT NULL), so deleted books remained in currentBookIds
and their remote files were never cleaned up. On next sync the remote
snapshot would re-create the book record, effectively un-deleting it.
Add WHERE deleted_at IS NULL to the query so remote files for deleted
books are properly cleaned up during sync.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 7ceae06 commit 654fe56
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
0 commit comments