Files
coder/coderd/database
Garrett Delfosse a328bee007 fix(coderd/database): fix duplicate chat projects migration and stale chat title query (#30257)
Fixes two semantic conflicts on main from merging #29242 (chat
projects):

- **Duplicate migration 000606.** #29242 and #29081 both added `000606`,
so golang-migrate refuses to load the migrations (`duplicate migration
file: 000606_chat_projects.down.sql`), breaking coderd startup and
database tests. `000606_chat_projects` (up, down, fixture) is renamed to
`000607`. Main has never been able to migrate with the duplicate, so no
deployment has recorded version 606 as chat projects.
- **Stale generated code.** #30254 added `UpdateChatTitleByIDIfTitle`
with an explicit chat column list that lacks the `project_id` column
#29242 added. On regeneration sqlc emits a separate row type instead of
`database.Chat`, and dbauthz fails to compile (the `gen` check). The
column is added and `queries.sql.go` regenerated.

`make gen` is clean, `go build ./...` passes, and the migration, dbauthz
method suite, and chatd title tests pass.

---
Generated with Coder Agents on behalf of @f0ssel.
2026-10-01 13:10:33 -04:00
..
2026-10-01 11:49:21 -04:00
2026-10-01 11:49:21 -04:00
…