Prisma

P

Prisma

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

Join

How to clone/migrate data from prisma postgresql to self hosted pg

I have a dev database on prisma pg which I have been using for production and i have accumulated some user data(23MB). What is the best way to migrate/clone the database to a (1) prisma production database and (2) self hosted coolify postgresql? I have tried connecting both(prisma & coolify) of them via pgadmin 4 and tried a simple backup and restore approach which failed(partially), seeing the data on the target database but pgadmin said "failed" with getting error: ```...

Can't use prisma in auth.config.ts

I get the following runtime error when I try to query with prisma in my auth.config.js file: "TypeError: Cannot read properties of undefined (reading 'modules')" "dependencies": { "@auth/prisma-adapter": "^2.9.1", "@hookform/resolvers": "^5.1.1",...

Prisma + Supabase RLS

Is there a way i could pass down the user info or whatever to implement RLS while still using the prisma ORM ?

How do you deploy the new generated client?

I have tried using the new generator, as advised to do so by the CLI. ``` generator client { provider = "prisma-client" // Required...

Transaction API error: Transaction already closed

I'm getting this error in production, but not locally. This is in code that's been running in prod now for about 1-2 years. Full error message:
Transaction API error: Transaction already closed: A commit cannot be executed on an expired transaction. The timeout for this transaction was 5000 ms, however 5408 ms passed since the start of the transaction. Consider increasing the interactive transaction timeout or doing less work in the transaction.
...

Nested Create Queries Succeed but Data Missing

Hello, We’ve been encountering a critical issue when our SQL Server is under moderate load. Specifically, we’ve observed that some nested create queries executed via Prisma return a success response, but the corresponding records are later missing from the database. This issue appears to have started after we migrated our major create workflows to Prisma (we’re currently using Prisma Client v5.0.0). Based on our investigation, it seems possible that Prisma may be returning a success response before the underlying transaction is fully committed—and in certain rollback cases, it doesn't surface an error to the application....

Prisma hanging on cloudflare

Hello! I am using Prisma ORM on cloudflare workers and I am seeing quite a strange error:
The Workers runtime canceled this request because it detected that your Worker's code had hung and would never generate a response.
The Workers runtime canceled this request because it detected that your Worker's code had hung and would never generate a response.
...

Problem: npx prisma migrate dev fails with Error P3006 (but database is reachable)

I'm running into an issue with Prisma Migrate and can't find a solution after trying multiple approaches. --- Initial Setup...

How can i debug a failed connection?

I'm trying to use prisma to connect to a mariadb database ``` generator client { provider = "prisma-client-js" }...

Some problem with server?

Hi, I can access my console.prisma.io, but seconds after show me this message (print 1)... And fom linux bash i receive this reponse when run "npx prisma migrate reset --skip-seed"... (print 2)...
No description

Can I get Prisma to give me the full migrate+deploy SQL as a string?

I'm exploring blue/green deployment and zero-down-time releases, and would love to know if I can get prisma migrate deploy to give me all of the SQL it's going to run as a string? For example, lets say we add a column to a table - we'd have a file in prisma/migrations/[datetime]_add_column/migration.sql - prisma migrate deploy would theoretically run the contents of that file in a DB...

prisma v6.9.0 connection string

I'm using Neon postgres. Since I updated to latest prisma version, I'm getting the following: [auth][error] AdapterError: Read more at https://errors.authjs.dev#adaptererror [auth][cause]: PrismaClientKnownRequestError: Invalid p.account.findUnique()` invocation in C:\Users\dmoza\Documents\projects\my\saas\openstud.next\server\chunks\node_modules__pnpm4cbb8743..js:45:45 ...

Can't install prisma from npm

Hi, trying to install prisma, bug got error I'm trying different pc, internet, it doesn't help. Any ideas? npm error code 1...

Recommended Enum usage with Prisma and Zod

Currently, I have enums in my Prisma models which are also redefined in Zod schemas like this:
export const ItemRequestStatusEnum = z.nativeEnum(ItemRequestStatus);
export type ItemRequestStatusType = z.infer<typeof ItemRequestStatusEnum>;
export const ItemRequestStatusEnum = z.nativeEnum(ItemRequestStatus);
export type ItemRequestStatusType = z.infer<typeof ItemRequestStatusEnum>;
...

Update performance issue when performing many single update() operations

I'm having big performance issues trying to update many rows inside a transaction here's the code: I tried to parallelise the updates with a Promise.all but no improvements. I have about 50 elements in data and it takes an astonishing 4 seconds to do such a simple update....

Upgrade to queryCompiler & driverAdapters in a turborepo causes errors

I am looking to upgrade and use queryCompiler + driverAdapters but am hitting this issue: https://github.com/prisma/prisma/issues/27083 Is anyone aware of a workaround or fix for this?...

@prisma/client v6.9 issue

I'm still getting this damn error when running build or dev: ` Collecting page data .Error: Failed to load external module @prisma/client: Error: Cannot find module '.prisma/client/default' Require stack: - C:\Users\dmoza\Documents\projects\my\saas\openstud\node_modules.pnpm@prisma+client@6.9.0_prisma_12f395b7f2c46395cb11d4f7d1b6236f\nodemodules@prisma\client\default.js - C:\Users\dmoza\Documents\projects\my\saas\openstud.next\server\chunks[root-of-the-server]__60ad3a87..js...

Scrolling Filters and Fields inside Prisma Studio

Hey there! I'm reaching out because of https://github.com/prisma/prisma/issues/26464: I just tried out most recent Prisma 6.9.0 and the issue seems to persist. So I have the following question: Is there a known workaround for this? So that we can scroll again and see all fields?...

Prisma ESM / tRPC 11 issue

Hi everyone! Key components of our stack: - Prisma 6.9.0 (with pg adapter)...

Prisma pull/push not working with PrismaPg adapter

I'm trying to use Prisma with GCP Cloud SQL so I have custom prisma.config.ts which uses PrismaPg and to make the connection. However on every push/pull command I get this error: ``` Error: Column type 'name' could not be deserialized from the database. 0: sql_schema_connector::flavour::postgres::describe_schema_with with circumstances=BitFlags<Circumstances>(0b100, CanPartitionTables) preview_features=BitFlags<PreviewFeature>(0b0) namespaces=None schema="public"...