prisma-patterns
Prisma with PostgreSQL in NestJS - schema conventions (uuid ids, createdAt/updatedAt, soft delete policy, enums), PrismaService lifecycle, migrate dev versus deploy workflow, interactive versus batch transactions, N+1 and select/include discipline, cursor pagination, raw query safety, error mapping (P2002, P2025), real-database testing, indexes, JSON columns for message parts, DTO mapping instead of exposing models, and connection pool sizing. Load when writing or changing schema.prisma, migrations, Prisma queries, transactions, or repository code.
Pinned to revision c74eff4a9f08, so it is the text this page describes rather than whatever the author pushed since.
Files
Every link opens the file at its source, pinned to the revision this page describes.