feat(db/m7-coverage-gauge): GetAlbumCoverageRollup query

FILTER-aggregate count over albums.cover_art_source and albums.mbid
returning total, with_art, pending, settled, pending_no_mbid in a
single round-trip. Sub-millisecond on realistic libraries; no index
needed for v1. pending_no_mbid is a subset of pending — the UI
tooltip uses it to show how many "pending" rows are blocked on
missing MBID and won't be moved by another scan.

Also bumps the Makefile sqlc pin from 1.27.0 to 1.31.1 to match the
version that produced all existing committed dbq/*.go files. The
prior pin was stale; running make generate against 1.27.0 silently
rolled the codegen back (cosmetic version headers on most files
plus a real codegen shape change in DeleteArtistIfEmpty).
This commit is contained in:
2026-05-06 09:40:26 -04:00
parent 4481874482
commit 98ec64c658
3 changed files with 54 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
.PHONY: generate test test-short lint build
SQLC_VERSION := 1.27.0
SQLC_VERSION := 1.31.1
generate:
docker run --rm -v "$(CURDIR):/src" -w /src sqlc/sqlc:$(SQLC_VERSION) generate