8 Commits

Author SHA1 Message Date
crocodilestick 39183b067b fix: add safe cascade migration for progress sync tables and update docs 2026-01-26 19:32:05 +01:00
Gordon Tyler bb8d06b631 fix: cascade deletes for progress syncing tables
The tables created for progress syncing have foreign key references to other tables (`books` and `user`). If foreign key constraints are enabled when connecting to the database (as is so in Calibre Desktop), deleting a book or user will fail unless the referencing child rows in the progress syncing tables have also been deleted.

One way to achieve this is to create the progress syncing tables, `book_format_checksums` and `kosync_progress`, with the `ON DELETE CASCADE` clause added to the foreign key reference. This will automatically delete child rows in these tables when their corresponding parent row in in `books` or `user` is deleted. In other words, book checksums and user sync progress will be deleted when the corresponding book or user is deleted.

Fixes: #842
2025-12-29 09:39:39 -05:00
crocodilestick d67dbb6b6e Revert unnecessary DB connection changes 2025-11-28 12:14:02 +01:00
crocodilestick 51e4e8460a Cleanup models.py: remove unused db_path and silence warning 2025-11-27 12:59:28 +01:00
crocodilestick e83d9f2f5d Fix ingest processor test path and add DB debugging 2025-11-27 09:35:21 +01:00
crocodilestick 60e188def4 Fix missing log directory and attached DB table creation 2025-11-27 09:16:19 +01:00
Zane Wolfgang Pickett 43082c7f79 Setup KOReader to CWA & Kobo Progress Syncing 2025-11-09 22:53:21 -08:00
Zane Wolfgang Pickett 0a88a98f74 Setup MD5 Based KOReader Book Matching 2025-11-09 22:10:01 -08:00