Prisma

P

Prisma

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

Join

New to Prisma, can I not rely on the order of the array when creating nested records?

So referencing organiser.events[0] doesn't seem to refer to Event 1? ``` const organiser = await prisma.organiser.create({ data: {...

Optimize recording does not record any query

I start the recording, I interact with the app, all queries function correctly and are logged to console, but nothing shows up in the recording, I have already tried: - removing the settings and the $on callback - reassigning the client with the result of $extend...

Prisma Client could not locate the Query Engine for my runtime on AWS

guys im deploying prisma to a lambda on AWS with arch="arm_64" in my prisma schema i have this: ```ts generator client {...

Working with decimal in NextJS

Has anyone found a reasonable way to work with Decimal in NextJS? "Only plain objects can be passed to Client Components from Server Components. Decimal objects are not supported." Every time we add a Decimal to our schema, we end up breaking a bunch of server components. The only option seems to be manually serializing and deserializing everything, which isn't great....

Error The "payload" argument must be of type object. Received null

Hello, I keep getting this error with Next.js 15 Postgre SQL and Prisma. I'm confused on if it's a Prisma bug or something else? I'm checking my object before performing any mutation, and it's not null. ...

How to use Pulse with Next.js

I’m trynna figure out what’s the best approach to use Prisma pulse with Next.js (app router), so I came up with this but im not sure if this is the right way to do it ```jsx async function setupAllPostsSubscription() { const subscription = await prisma.post.subscribe()...

`isNot: null` filter on relation does not work

As you see in the image i use the not null filter in order to return routes that are assign to both regions. Currently all routes do not have a region. But the console log returns null for the relation. ...
No description

Database connection dropping

I have a postgres sql db on GCP with a connection string. i have set up publications on this table using sql commands from the docs. for some reason, pulse keeps dropping the connection. I see "Unexpected Error Occured" on the console and a DIsconnected status for Database connection ...

How to run migrations with SET ROLE xxx

Hi everyone, I’m working on a project where I need to run Prisma migrations, but the database connection requires a specific role to be set before executing any SQL commands. For example, I need to run: SET ROLE some_table ...

Prisma Studio crashes with large databases

I have the following model: ```prisma model GTFSImport { id Int @id @default(autoincrement())...
No description

Weak relations

Hi there, Is there any way to use Prisma relations without any foreign key constraint on Postgre? I'd like to be able to set this up on a per table basis and not for the whole database like relationMode = "prisma" would do. I've been looking online for this and it appears to be a feature that has been requested a couple years ago already. What's the status on this?...

Prisma.join throwing error when using edge client

prisma : 5.22.0 @prisma/client : 5.22.0 Node.js : v23.1.0 Next.JS : v15.0.3 ...
Solution:
Hi @Papa Smerf The edge client is a stripped down version and may not support the Prisma.join() api. Rewriting the raw query without using Prisma.join() should resolve this issue. `` await prisma.$queryRaw...

creation of new user failed and exited an error in vercel logs for my project

In the creation of new users I made use of better auth for authentication and the creation of a new user in my nextjs project which I integrated with prisma as my ORM with supabase as my database............. this arrangement however performs the creation of the new user in development however after deploying to vercel and performing the same authentication of new users it throws this error which indicates that the new user cannot be created and i don't seem to know why it doesn't work in deployment where i have added the environemt variables required by prisma like the DATABASE_URL and the DIRECT_URL needed by prisma to connect to my supabase database and this connnection worked fine The error from vercel logs upon creation of new users: [Better Auth] ERROR ...

Using OR in connectOrCreate

I want to connect to an image if imageId is defined. If not, I want to connect to an image with a matching fileStorageObjectId. If it is not found I want to create a new image. ```js featuredImage: { delete: true,...

Failed requests

After enabling detailed logging on the Prisma Client instance, I've noticed quite a few failed query attemps. ``` prisma:warn Attempt 1/3 failed for querying: This request must be retried prisma:warn Retrying after 26ms...

Nuxt 3 with prisma

Hi there! I've been using prisma in all of my past projects and I'm looking forward to be using it in my future nuxt projects too. I've seen that there is the official @prisma/nuxt-prisma module but it somehow feels a bit dead. - The installation doesn't seem to stable work at all....
No description

Amazon Linux 2023 support

I'm trying (and failing) to run Prisma on Node 16 on AL2023 (x86_64. Am I right in thinking that it's not compatible as it's not downstream of Alpine, Debian or RHEL?

Neon adapter (driverAdapters) gives error on PrismaClient init

Hey there. I've wanted to run inngest events that trigger some prisma stuff, but I'm getting the error
PrismaClient failed to initialize because it wasn't configured to run in this environment
PrismaClient failed to initialize because it wasn't configured to run in this environment
So I've decided to take a look at the driver adapters. After following the setup page to update my existing code, I have the following prisma client file : ...

Fix schema error

I have this schema: ```prisma // This is your Prisma schema file, // learn more about it in the docs: https://pris.ly/d/prisma-schema ...
Next