| 1 | # 0030 — Columns are snake_case in the database, camelCase in the schema |
| 2 | |
| 3 | **Status:** adopted |
| 4 | |
| 5 | ## Decision |
| 6 | |
| 7 | The drizzle client and drizzle-kit both run with `casing: "snake_case"`, so a schema field `repositoryId` is the column |
| 8 | |
| 9 | Raw SQL never spells a column by hand. It interpolates the column, `${schema.issue.number}`, and an upsert reads the proposed row through `excluded(column)` from |
| 10 | |
| 11 | Migration 0034 renamed every existing camelCase column. Drizzle generated it; each rename was confirmed as a rename, never a drop and a create, and it moves no data. |
| 12 | |
| 13 | ## Why |
| 14 | |
| 15 | Querying the database directly is easier without quoting every column. |