Prisma

P

Prisma

The official Discord server of Prisma! Find us online at prisma.io

Join

Is `attachDatabasePool` needed if I am using Prisma Accelerate?

I have a NextJS app that's hosted on Vercel. The app uses Prisma Postgres with Prisma Accelerate. As far as I understand "Prisma Postgres provides built-in connection pooling by default, enabled by Prisma Accelerate. By using Prisma Postgres, you get the benefits of connection pooling without having to configure anything." https://www.prisma.io/docs/postgres/database/connection-pooling...

Prisma Client module not found after packaging it on Electron-forge

Has anyone ever succeed packaging electron-forge with vite template with prisma orm I'ts giving me headaches.
No description

Prisma Schema Config

I am encountering some issues with my data model when I upgraded to version 6 of prisma. The issue I am encountering is when I navigate to the model, it will give me linting errors related to the redundancy of the model. Any time I click into any of the data models, the linting errors are removed. I have screenshot what this looks like in vscode. Here is my config. My current assumption is that the config is currently configured where it is identifying the prisma client schema along with all of my other schema files. I am curious what the fix is for this though. When I try to modify the filepath to include special characters in the config (i.e., schema:"./prisma/models/*.prisma" it does not recognize this pattern). Curious how I should modify my config. Thanks for any help...
No description

Error: Schema engine error

I'm getting an error while npx prisma migrate dev --name init ``` Environment variables loaded from .env Prisma schema loaded from prisma\schema.prisma...

Export extended Prisma client types

Greetings, I'm trying to export an extended Prisma client types from a library package that is meant to be use through multiple NestJS applications. This package contains:...

(alias) type PrismaClient = any

after generating types using npx prisma generate i got is this normal? (alias) type PrismaClient = any...

Prisma filtering VS pure JS filtering

Greetings! I have a decently sized dataset (10k+ records) with a couple of includes.
I need to filter this dataset by three dimensions:
...

Autocomplete none

hey guys i have created a project using prisma installed ``` npm i -D prisma...

All the data in my database has been deleted.

All the data in my database has been deleted. How to recover or the cause of the problem, I have used the free version Prisma Postgresql Thanks...

Will using prisma accelerate with AWS RDS aurora increase my network egress traffic costs?

We're integrating prisma orm, and wondering about if we should also start with prisma accelerate. It looks like we might add network traffic costs to our setup on AWS by going with accelerate as our proxy. I imagine that we could also move to prisma postgres too?

Error trying to generate Prisma Client inside OpenAI Codex Cloud environment. Can't download binary

I'm trying to use OpenAI Codex AI agent (Cloud). I'm new to this (not a big vibecoder myself) but Codex is mostly working. The only thing I can't get right despite having tryied a lot of different stuff is have it successfully generate my Prisma Client inside its cloud container so that it could run the code and test stuff autonomously (I don't mean to really use the client making requests to any database. its just that without the generated client I get TypeScript errors where I'm importing it)....

GetPayload: Make all properties optional on related model

I'm struggling to find a clean way to use the the GetPayload model helper functions with nested relationships without some level of properties being required. We use helper functions to compute dynamic data points (status', counts, etc). For a specific helper function, we attempt to compute a status based on the number of entries in a related 1:M relationship. We do not care which fields are included in the array of related objects, just that the array itself exists. I've included several examples below using a standard users->posts relationship to demonstrate the issue. In each case below, all fields are required. ```typescript type UserPosts = Prisma.userGetPayload<{...

Run `prisma dev` programmatically

Is there a programmatic function to have run prisma dev (local postgres db) programmatically? Thanks.

Prisma website crush

Hi, when entering prisma website it randomly freezes and throws this error: TypeError: Cannot read properties of undefined (reading 'length') at main.c4a49258.chunk.js:1:8629...

Is there any way to close existing connections?

Like the title says. I've hit the limit and because app is deployed trough vercel I can't close these connections anywhere through vercel or prisma.io. Is there any way I could close these zombie connections?

Timed out fetching a new connection from the connection pool.

can someone actually give valid solution to An error occurred while trying to interact with the database, nothing i try works, im sure my service makes quite a lot of db requests, not sure how to see that inside of postgres or such, but how to fix this for once, it spams them like thousands

prismaSchemaFolder Pattern?

Hi, do I need a .prisma file every time I encounter a folder structure of prismaSchemaFolder? Based on the example below, (a,b).prisma fails to read the model of c in (a,b).prisma. The services folder does not have .prisma. The services folder subtest folder has .prisma....

Does prisma make a query even though the value is null?

For example I have the following table that has connection to many model FileJob { id String @id originalName String? createdAt DateTime @default(now())...

Unknown Accelerate usage

Hi, for work I created a Vercel Prisma Postgres integration (free tier for now). I then connected to the direct postgres database (without accelerate) in my nestjs app. Everything was fine until I got quota alerts and now it has reached the limit. When I was looking at the dashboard when it was still working, I could see ~20k accelerate operations per day. So I'm not sure where the operations are coming from (since I don't use accelerate for my app). What am I missing?

select 1 queries in production

Hey all, I'm trying to track down an inconsistency between dev and prod environments - I'm using Neon postgres, and I'm finding that in my production environment, Prisma is running a SELECT 1 query about every 5 seconds, but it doesn't seem to happen at all in development. I haven't been able to find any options about enabling/disabling this behavior, and I'm having trouble even figuring out what's triggering it it one environment and not the other. This looks like some kind of connection health check, but it's causing the connection from my application to Neon to never go fully idle, which means I'm winding up paying for uptime usage when it should be spinning down to zero when inactive. ...
No description
Next