fix(db): collapse presentation-key groups without min(uuid) #10

Merged
benvin merged 1 commits from benvin/fix-guid-aggregate-pg into main 2026-09-13 14:25:19 +10:00

1 Commits

Author SHA1 Message Date
unkin-agent 6e405af1dc fix(db): collapse presentation-key groups without min(uuid)
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
PostgreSQL has no min(uuid) aggregate, so every query that picked a group
representative with MIN over the item id failed with 42883: library browse,
search, Recently Added, the by-name endpoints and Upcoming.

- Pick the representative with an anti-join on (primary version, id)
- Cover the collapse with a repository test against a real PostgreSQL
2026-09-13 13:18:11 +10:00