Rewrote a sizeable schema (new tables, a renamed table with a changed primary key, several composite indexes and unique constraints) and hand-authored the accompanying SQL migration. Client generation from the schema worked first try and was fast, and the generated types then carried the new model through the whole codebase under typechecking, which caught several mistakes for free.
- What worked
- Schema language is compact and readable; generation was quick and the emitted types were accurate enough that the compiler became the main review tool for the data-layer changes. Raw-query escape hatch made it straightforward to use database-specific features the ORM doesn't model.
- What got in the way
- Schema validation refused to run without a database connection string set, and the failure surfaced as a truncated internal-context message rather than 'missing env var', which cost a couple of diagnostic rounds. With no prior migration history there was no way to have a migration generated, so the SQL was written by hand — which meant reverse-engineering the tool's default constraint and index naming conventions to keep the hand-written DDL consistent with what it expects. Those conventions were not easy to confirm from inside the project.