Files
coder/coderd/database/migrations/000648_chat_diff_statuses_root_chats.down.sql
T
Mathias Fredriksson 6239c3ac94 fix(coderd/database): poll only root chat git refs (#31920)
Diff-status rows on subagent chats still consume provider requests.
Move their refs to root chats so the root chat's Git panel shows them,
and limit diff-status refresh to rows on root chats.

Recognize a subagent chat when root_chat_id or parent_chat_id is set,
matching Chat.IsSubChat.

Keep existing root rows on conflict. Otherwise retain the most recently
refreshed row from a subagent chat, with its metadata and timestamps.
2026-11-30 16:21:47 +02:00

4 lines
193 B
SQL

-- Refs moved to root chats stay there on downgrade. The up migration does
-- not record which subagent chat owned each row and discards duplicates,
-- so the original rows cannot be restored.