Closed lihebi closed 1 year ago
To use the package in a server app, run pnpm add @codepod/prisma
, and use like this:
import prisma from "@codepod/prisma";
prisma.repo.findFirst(...)
If you need to perform prisma migration
api
container shellpnpm dlx prisma migrate dev --schema ../../packages/prisma/prisma/schema.prisma
- run
pnpm dlx prisma migrate dev --schema ../../packages/prisma/prisma/schema.prisma
I would do this instead (looks simpler):
cd ../../packages/prisma
pnpm dlx prisma migrate dev
Prisma related code is now moved from
apps/api/
folder topackages/prisma
folder, so that the prisma client can be shared among different servers.