Defining models
The task tracker needs aTask model. Define it in prisma/schema.prisma:
Database access
All database access in procedure handlers goes throughctx.db:
ctx.db is a Prisma client with the authenticated user’s RLS context (user ID, role, scopes, org IDs) injected automatically.
Built-in tables
The scaffolded app includes tables provided by the framework, including common ones likeUser — so you don’t need to define them yourself. You can add relations to built-in tables from your own models, as the Task model does above with User.
For the full list of built-in tables, multi-database support, indexing, transactions, and identity patterns, see the Database reference.
