mirror of
https://github.com/hectorqin/reader.git
synced 2026-11-12 05:50:54 +08:00
reading_progress keeps one row per book and last-writer-wins, which answers "where am I" and loses "where was I": a stale device, a mistapped 目录 entry or a clock running ahead overwrote the place for good (P0: 进度历史). Every valid progress write now also lands in reading_progress_history, including a write that lost the merge. A device reading on through one chapter updates its latest entry (same chapter, within 5% and 30 minutes) instead of adding rows; another chapter, a jump, another device or an out-of-order write is a new entry. The newest 50 per book are kept. GET /api/v1/sync/progress/:bookId/history lists them, newest first, for the signed-in account only. The table is new (CREATE TABLE IF NOT EXISTS), so the schema change is additive and older builds sharing the database ignore it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>