bugfix: subquery-wrap pending chapters query so DISTINCT + ORDER BY agree (0.26.1)

PG rejects `SELECT DISTINCT c.id, c.manga_id, cs.source_url ... ORDER BY
c.manga_id, c.created_at` because the ORDER BY references a column not in
the DISTINCT projection. Wrap the DISTINCT in a subquery (which includes
created_at) and apply the ORDER BY in the outer SELECT.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
MechaCat02
2026-05-24 22:20:15 +02:00
parent 728d704a66
commit 89b84252a5
4 changed files with 20 additions and 11 deletions

2
backend/Cargo.lock generated
View File

@@ -1448,7 +1448,7 @@ checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
[[package]]
name = "mangalord"
version = "0.26.0"
version = "0.26.1"
dependencies = [
"anyhow",
"argon2",