chore(prisma): point root postinstall to BFF schema #9

Merged
julien merged 1 commits from chore/prisma/schema-path into main 2026-05-04 15:33:40 +02:00

1 Commits

Author SHA1 Message Date
Julien Gautier 383e565b93 chore(prisma): point root postinstall to BFF schema
CI / check (pull_request) Has been cancelled
CI / perf (pull_request) Has been cancelled
CI / a11y (pull_request) Has been cancelled
CI / commits (pull_request) Has been cancelled
CI / scan (pull_request) Has been cancelled
`@prisma/client`'s postinstall hook runs `prisma generate` from the
workspace root, where it doesn't find a schema in the default
locations and warns. The hook then exits without generating the
typed client — fine today (the schema has no models yet, no code
calls into the client at runtime), but a trap waiting for the first
real model to be added.

Declare `package.json#prisma.schema` so the postinstall hook locates
the schema at apps/portal-bff/prisma/schema.prisma and generates the
typed client unconditionally on every `pnpm install`.

Note: Prisma 6.19 emits a deprecation warning ("migrate to
prisma.config.ts"). Migrating that format will be folded into the
future Prisma 7 upgrade (which itself depends on nestjs-prisma
catching up to Prisma 7 and will get its own ADR).
2026-05-04 15:27:37 +02:00