Prisma

P

Prisma

Join the community to ask questions about Prisma and get answers from other members.

Join

Property '[PrivateResultType]' is missing in type 'TypedSql<Parameters, Result>'

Error:
Argument of type 'TypedSql<Parameters, Result>' is not assignable to parameter of type 'TypedSql<unknown[], Result>'.
Property '[PrivateResultType]' is missing in type 'TypedSql<Parameters, Result>' but required in type 'TypedSql<unknown[], Result>'.ts(2345)
Argument of type 'TypedSql<Parameters, Result>' is not assignable to parameter of type 'TypedSql<unknown[], Result>'.
Property '[PrivateResultType]' is missing in type 'TypedSql<Parameters, Result>' but required in type 'TypedSql<unknown[], Result>'.ts(2345)
...

Tips for dividing multiple schema files

It's amazing that Prisma now supports multiple schema files. But I have trouble splitting up my schemas and deciding what belongs together. For example, would you put all of these Auth.js related schemas into one file? Or would you make a separate file for each of them?...

Suddenly got P6008 out of nowhere

I've never had this issue before but now suddently lots of my requests to prisma are failing: PrismaClientKnownRequestError: Invalid prisma.user.findUnique() invocation: ...

Typing Prisma and how write "or" and a named type (prisma ORM/mongodb)

Hello i would like to know how can i write or typed that with Prisma (mongodb DB). I don't know how to write 'or' with Prisma or a named value/type. I know I can mark it as json then any in typescript but I'd like to know if it's possible to type something like this Do you have any ideas ? Thank you very much export interface Offer { id: string originalPrice: string...

Schema migration automation

Public schema is attached to my node.js app...i want to migrate schema of for y name schema to database.... I have prisma/public/public.schema folder structure and prisma/shema.prisma for schema db structure...so on api request i want to do migration how??? I have used excutesafe but its failed due to multiple commands.... Sql inside of it.......

Timeline for GAing the `driverAdapters` feature?

Hi, Is there a timeline for GAing the driverAdapters preview feature? And is there any other info about "re-hauling part of the prisma-engines architecture"? I saw a comment about this here on GitHub: https://github.com/prisma/prisma/issues/23930#issuecomment-2598462547...

Prisma DateTime

Does the Prisma DateTime type make the DB use more storage than just storing a unix time when using MongoDB? Since its stored as a full date string.

type-safely wrapping `findMany`

I am trying to wrap the findMany function in a separate function. Can someone help me to get this right: ```ts...

cuid2 length

What is the length of the generated cuid(2) ids? I'm looking to validate them via zod.

Modeling data

Can i make my model for a specific field be lowercased just like doing something like this model User { email String @unique @@lower }...

Intermittent Server Error with Prisma 6.2.1 with Node 22 on Linux Mint

I am building NextJS application with Prisma on Linux Mint and have recently starting getting intermittent errors when running the application on localhost. For example, if I change a file and spark a hot module replacement, SOMETIMES it will give me an error on the console saying : (see attached) ``` ⨯ [Error: [object Object]] { digest: '520418415' } GET / 500 in 2396ms...
No description

Build nightmare BigInts and external prisma/zenclient project not building with TurboRepo and nuxt

I have a nuxt app in a turbo repo monorepo and have followed the instructions to setup a separate /db project in packages. I can get prisma and zenclient to work when I include them as part of the nuxt projecvt, but when I separate them i get the following error when it ry to build: @rhythmic/platform:build: ERROR Transform failed with 3 errors: @rhythmic/platform:build: C:\Projects\rhythmic\packages\db\generated\prisma\runtime\library.js:111:10142: ERROR: Big integer literals are not available in the configured target environment ("es2019") ...

binaryTargets option seemingly not working with bun in CI

When using the setup-bun github action, I get this error with Prisma ```sh PrismaClientInitializationError: Prisma Client could not locate the Query Engine for runtime "debian-openssl-3.0.x". This happened because Prisma Client was generated for "debian-openssl-1.1.x", but the actual deployment required "debian-openssl-3.0.x"....
No description

ِArray of data

How can i let user to add array of data using form

Initialisation of prisma req based nestjs

Respected sir, My passport google strategy requires authservice in and that requires prisma request based service due to this my passport js is not initializing at start of app.... For that ai suggested moduleref of prismaReqBased service anything best service to inject in authservice.... Anything i am doing wrong .. ...

Error During Migration: must be a member of pg_signal_backend in Supabase with Prisma on Serverless

Hi everyone, I’m using Supabase as my database and Prisma (version ^5.15.1) as the ORM in a serverless environment. When I try to execute a migration (npx prisma migrate dev), I encounter the following error: ```...

Migrating data from Railway to new database Prisma Postgres

Hey, i got dump of data from railway, how can i migrate it here? Dump is this fie...
No description

Accelerate cannot connect to Postgres RDS inside of VPC with static IPs configured

Using latest version of Prisma on a node server and Postgres 13 in AWS RDS. We're seeing the error Accelerate was not able to connect to your database. The underlying error is: Health Check of Query Engine timed out. We have an RDS instance inside of a VPC and allowed the static IPs to connect inbound to our database. Do you have any recommendations on how to troubleshoot? Are there internal logs from prisma side that can help us debug?...

Count records where number of related records is greater than X

Hey folks, I'm struggling to figure out the right way to express a particular query. I have a model game and a related model like. A game has 0 or more likes related to it. What I want to get: the total number of games that have at least 5 related likes. Ideally I would do this without fetching unnecessary extra data from the database. Appreciate any help, thanks....

Can't reach database server at `aws-0-ap-southeast-1.pooler.supabase.com:5432

Environment variables loaded from .env Prisma schema loaded from prisma/schema.prisma ✔ Generated Prisma Client (v6.2.1) to ./node_modules/@prisma/client in 41ms ...