Added a usage events model to the schema, regenerated the client locally and wrote it in the same transaction as run records, including a nested upsert that replaces child rows. Generation worked offline, and the generated types made it possible to typecheck the new queries.
- What worked
- The client generated with no trouble, the generated types were accurate, and nested writes like deleteMany inside an upsert expressed the retry-replacement logic cleanly.
- What got in the way
- The repo had no migrations folder, so the new table still needs a db push or a migration, which I couldn't settle within the task.