Prisma

P

Prisma

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

Join

Data Location Security

Hi! My company is looking to subscribe to pulse / accelerate but we have data requirements around data location. Is there anywhere that talks about data storage / transient data passthroughs? IE, the data flow through X country or caching is with X company...

The response size of the query exceeded the the maximum of 5MB

Hi prisma team, Since I've set up Accelerate, some queries won't work because of the 5mb limitation. Strangely, the limitation is activated for a small query fetching approx 300 records, whereas it's working fine for far bigger queries. here's the model: model User {...

NextJS version 13.5.4 in prod getting Internal Server Error

Im using 13.5.4 of the nextjs version and I tried other versions too but I always get internal server error in prod mode but in local there is no problem. I tried other databases too but I still get the same error. There is no problem with databases because I tried with other projects too but they seem to work. I am using AWS Amplify for hosting and AWS RDS for databases. By the way I can connect to databases with data management tools. What could be the reason for this? Prisma and Prisma Client version 5.14.0 The steps when I follow while installing prisma:...

How to authenticate Prisma Optimize in a VPS ?

Hi everyone. I enabled Prisma Optimize on a project to try it out. On local, I can authenticate using the browser, all works well. On a VPS though, I pushed to prod and my website crashed. How can we authenticate to Prisma on a VPS ? What command could I run before hand to avoid this issue ?...

In a Prisma result extension, is it possible to require ("needs") a relation?

Hi! I love extensions, in particular result extensions that I use extensively! For now, I use it only with fields that belong directly to the model, but I often want to "require" (the "needs" field) fields that are in a relation. Is that possible?...

I want to find a user with either email or username but I'm getting a typescript error

I'm setting up nextauth in nextjs with prisma and postgres and I want the user to be able to interchangably log in with either email or password. So I set this up: ` async authorize(credentials) { const user = await prisma.user.findUnique({ where: { OR: [ {...

Filter (where) for nonexistant boolean field

Hi, is there a way in prisma to filter in where for a nonexisting boolean field ? Curent situation: prisma 4.10 + graphql + nexus with mongoDB We introduced a Boolean field later on and the older datasets don't have this field. In my queries I want to filter for this field to be false or nonexistant, but undefined is treated differently in prisma and isSet or null are not allowed for boolean fields. How can I filter for these conditions ?...

Prisma extend can change db pointing to?

is there anyway change the prisma db? change under extend or new prisma, i need to for multitenant

Setting Connection limit in gcp cloud run and cloud sql

What is the best practice when setting the connection limit of prisma in gcp cloud run? * I am using postgres from cloud sql * I have a master database with 14 cpu and 20GB ram * 3 replicas each with 10 cpus and 20GB ram , each can handle 500 connections...

Can composite type contain a list of another composite type?

i am trying to define a composite type Token as below, which will contain a list of another composite type Chain, is this valid? i don't see any documentation saying if this is valid or not. ``` type Token { id String symbol String...

Type Error

Hi, im trying run code using prisma ORM and cli, but, i when type "npx prisma migrate dev", works, but appears type errors.

Prisma Migrations With Turbo Repo

Hi - im using turborepo to house multiple apis, some frontends, and some cloud functions all within a single repo. I also have multiple shared packages that i use accross those deployables. One of the packages im introducing is packages/prisma-orm which will house all of my prisma logic - schema, migrations, etc. Because i have several different backends using this, each scalled horizontally, I want to make a standalone service for running migrations as a CI step. The issue is - if the `p...

Relation not included in the generated types

Hello, I have the following model, generated from a database-first approach. ```...

Need help with schema

I have models - Question and Answer There is a one to many relation : 1 Question has many Answers But I also need a relation for a single Answer, I will show the schema file, it is currently giving me error ...

Prisma is not using test env file

"test": "cross-env NODE_ENV=test && dotenv -e .env.test -- npx prisma db push && vitest"
"test": "cross-env NODE_ENV=test && dotenv -e .env.test -- npx prisma db push && vitest"
it is creating the following db ```...

Does prisma allow use of Shared Primary Key?

if so, what should the model look like? Sorry if this has already been asked somewhere, I can't find anything.

upsert orm

Hi guys, based on what i know, the upsert should work without passing id right? but based on the photo, the error showing id is required, can anyone help on it? am i doing anything wrongly?
No description

Why isn’t prisma adding support for mongo change streams?

Is it to sell prisma pulse? If so, isn’t that quite a messed up move? Like intentionally not adding essential features just to sell them in another product?

How do I setup my Supabase DB connection string to work with Prisma Accelerate

Supabase currently provide 2 connection modes; Session and Transaction (Pooler). From all indications, using the transaction mode (with pgbouncer=true) as the connection string in my Prisma Accelerate dashboard seems to be the intended approach. However, I get Error occurred during query execution: ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(PostgresError { code: "26000", message: "prepared statement \"s2\" does not exist", severity: "ERROR", detail: None, column: None, hint: None }), transient: false }) On the other hand, if I set the session mode connection url on my Accelerate dashboard, I get Client Max Connections Reached ...