diff --git a/server/db.py b/server/db.py index bfdbdfd..52e8ef0 100644 --- a/server/db.py +++ b/server/db.py @@ -7,9 +7,9 @@ reconnect cost is zero. WAL: SQLite serializes writers itself, so the lost-update races of the JSON read-modify-write era are gone. One-time import: a table that is empty while its legacy JSON still exists -gets absorbed (users.json, history/*.json, searches/*.json). The JSON files -are left in place as a last-known-good snapshot; the empty-table guard makes -a second import impossible. Legacy ghost rows (same episode stored with int +gets absorbed (users.json, history/*.json, searches/*.json); the files are +deletable once the tables are populated (the empty-table guard makes a +second import impossible). Legacy ghost rows (same episode stored with int AND str ep_id) are deduped on import: newest t per (user, slug, ep). """ import json