go test ./backend/database/... ./backend/library/... ./backend/queue/... ./backend/datamap/...
./scripts/codegen-check.sh
The second commit is plan 021 phase 2 only: the schema the classifier
records into (listening_events, skip_count/last_skipped), plus the
dead queue.source_playlist_id drop and the stale migration-chain
references cleaned out of the download/tagging schemas. The classifier
and its wiring are phases 1 and 3 and are not in this PR.
| commit | issue |
|---|---|
| `a3b5b437` fix(database): preserve playlist phantoms across a stale audio_files retire | #183 |
| `68e7edb8` feat(database): listening-events log with skip counters | — (plan 021 phase 2; #185 stays open) |
## Verification
- `go build ./...`
- `go test ./backend/database/... ./backend/library/... ./backend/queue/... ./backend/datamap/...`
- `./scripts/codegen-check.sh`
The second commit is plan 021 phase 2 only: the schema the classifier
records into (`listening_events`, `skip_count`/`last_skipped`), plus the
dead `queue.source_playlist_id` drop and the stale migration-chain
references cleaned out of the download/tagging schemas. The classifier
and its wiring are phases 1 and 3 and are not in this PR.
Closes #183
Retiring a stale audio_files dropped every playlist entry to an empty
row: ON DELETE SET NULL ran before the phantom_* columns were filled,
whereas the manual rescan path populates them first. Run the same
phantom population inside the retire transaction, before the drop, only
when audio_files is among the tables going, so
ResolvePhantomTracksAfterScan can re-link the entries.
Closes#183
Replace play_history with listening_events — one row per track exit,
kind (complete/play/skip) plus raw position/duration — and add
skip_count/last_skipped to audio_files beside play_count/last_played.
The classifier that writes these lands later (plan 021); this is the
schema it records into.
Also drop the dead queue.source_playlist_id column and remove the stale
references to the squashed migration chain in download_*.sql and
tagging_items.sql, declaring the missing download-request indexes inline.
yonlu
merged commit 6aeac42a46 into main2026-09-09 13:54:37 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
a3b5b437fix(database): preserve playlist phantoms across a stale audio_files retire68e7edb8feat(database): listening-events log with skip countersVerification
go build ./...go test ./backend/database/... ./backend/library/... ./backend/queue/... ./backend/datamap/..../scripts/codegen-check.shThe second commit is plan 021 phase 2 only: the schema the classifier
records into (
listening_events,skip_count/last_skipped), plus thedead
queue.source_playlist_iddrop and the stale migration-chainreferences cleaned out of the download/tagging schemas. The classifier
and its wiring are phases 1 and 3 and are not in this PR.
Closes #183