Fix Postgres 500s on days and entries by dropping SQLite rowid.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-09-07 12:50:53 +02:00
1 parent 9d5befdde9
commit ea38528ecf
5 files changed
+11 -5

No files matched your search

+2 -2
View File
@@ -95,7 +95,7 @@ def _day_messages(profile_id: str, spec: dict[str, Any]) -> list[dict]:
FROM messages m
JOIN conversations c ON c.id = m.conversation_id
WHERE m.profile_id = ? AND c.journal_day_id = ? AND m.conversation_id IN ({placeholders})
ORDER BY c.created, c.rowid, m.seq, m.id
ORDER BY c.created, c.id, m.seq, m.id
LIMIT ?
""",
(profile_id, journal_day_id, *conversation_ids, fetch_limit),
@@ -107,7 +107,7 @@ def _day_messages(profile_id: str, spec: dict[str, Any]) -> list[dict]:
FROM messages m
JOIN conversations c ON c.id = m.conversation_id
WHERE m.profile_id = ? AND c.journal_day_id = ?
ORDER BY c.created, c.rowid, m.seq, m.id
ORDER BY c.created, c.id, m.seq, m.id
LIMIT ?
""",
(profile_id, journal_day_id, fetch_limit),