From 4aca78cab82e98bef8b146e4d7ea2393e3367a52 Mon Sep 17 00:00:00 2001 From: Josue Zamudio Date: Wed, 16 Sep 2026 21:14:26 +0000 Subject: [PATCH] docs(db): legacy JSON files are deletable once tables are populated: the on-disk copies of users/history/searches were verified superseded by SQLite and removed; the docstring claimed they were kept as a snapshot --- server/db.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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