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
Owner

Summary

@prisma/client's postinstall hook runs prisma generate from the workspace root and didn't find a schema there, so the typed client was never generated. Fine today (schema has no models, no runtime usage), but a trap as soon as the first model lands.

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

Verified locally: postinstall now logs ✔ Generated Prisma Client (v6.19.3).

Notes

  • Prisma 6.19 emits a deprecation warning suggesting migration to prisma.config.ts. That format is freshly out of Early Access and the migration is small but non-trivial — folding it into the future Prisma 7 upgrade (which itself depends on nestjs-prisma catching up and will get its own ADR).

Test plan

  • CI green on this PR.
  • In the Run pnpm install --frozen-lockfile log of the check job, the warning prisma:warn We could not find your Prisma schema is gone, replaced with ✔ Generated Prisma Client.
## Summary `@prisma/client`'s postinstall hook runs `prisma generate` from the workspace root and didn't find a schema there, so the typed client was never generated. Fine today (schema has no models, no runtime usage), but a trap as soon as the first model lands. Declare `package.json#prisma.schema` so the postinstall locates `apps/portal-bff/prisma/schema.prisma` and generates the typed client on every `pnpm install`. Verified locally: postinstall now logs `✔ Generated Prisma Client (v6.19.3)`. ## Notes - Prisma 6.19 emits a deprecation warning suggesting migration to `prisma.config.ts`. That format is freshly out of Early Access and the migration is small but non-trivial — folding it into the future Prisma 7 upgrade (which itself depends on `nestjs-prisma` catching up and will get its own ADR). ## Test plan - [ ] CI green on this PR. - [ ] In the `Run pnpm install --frozen-lockfile` log of the `check` job, the warning `prisma:warn We could not find your Prisma schema` is gone, replaced with `✔ Generated Prisma Client`.
julien added 1 commit 2026-05-04 15:28:37 +02:00
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
383e565b93
`@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).
julien merged commit 7951908229 into main 2026-05-04 15:33:40 +02:00
julien deleted branch chore/prisma/schema-path 2026-05-04 15:33:46 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: julien/apf_portal#9