Prisma

P

Prisma

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

Join

Sudden connection string issues

Hi, I have been working the the ORM for a while now and for seemingly no reason I recently encountered issues with my instance. When sending any request this error is thrown:...

PostgreSQL Replica Identity Error Despite DEFAULT Setting

I am encountering a persistent PostgreSQL error related to logical replication and REPLICA IDENTITY on my database, and I would appreciate your assistance investigating the replication configuration. Problem: When attempting to delete a record from our User table, which has cascading deletes (onDelete: Cascade) set up for related tables (including Session, ProviderProfile, Subscription, etc. via Prisma), the operation fails with the following error:...

Sudden issues after trying to access localhost with my nextjs app - no changes in code.

Hey! I randomly started getting this after running pnpm run dev to start my dev environment - it shows up after I actually try to enter the website. I did no changes to code whatsoever, it just started happening. I am using prisma client and prisma 5.17 and nextjs 14.2.25 - I was wondering if anybody here might have a clue on what could have happened? I don't know what more info I could provide right away so just ask away if needed. Thanks in advance ```...

Starter plan pay as you go

I'd like to prevent my database from getting paused on the starter plan. I have a new app and unpredictable usage so I'm not quite ready for pro. I'd rather just pay to cover anything that exceeds the free tier usage. So do I just need to add a payment method to prevent the pause or is there something else I need to do?...

Keep the possibility to pass an existing Pool to `@prisma/adapter-pg`

In 6.6.0, the DX of @prisma/adapter-pg was simplified that a pool is created for you, but I'd like to keep the ability to pass an existing pool myself.

TypeScript errors with new `prisma-client` generated client

Hello people! I have a small question: I tried to update a small project to use the new generated client feature. It runs fine and it all works as it should, but when I run tsc -b to perform type checking, it fails with
app/generated/prisma/client/client.ts:341:16 - error TS4094: Property '_brand_DbNull' of exported anonymous class type may not be private or protected. 341 export const DbNull = runtime.objectEnumValues.instances.DbNull...

Hey! I'm seeing some queries taking ages to load when doing select with distinct.

Prisma Client's distinct option does not use SQL SELECT DISTINCT. Instead, distinct uses: A SELECT query In-memory post-processing to select distinct...

How do I use Prisma w/ Cloudflare Hyperdrive + MySQL using Cloudflare Workers

Hi I wanted to use Prisma with Cloudflare Hyperdrive + MySQL on Cloudflare Workers. I searched online and found that someone is using postgres adapter for postgres database. But I can't find the same one for MySQL(like adapter-mysql or something). I also found https://github.com/sidorares/node-mysql2/pull/2289 mentioned on https://www.prisma.io/docs/orm/prisma-client/deployment/edge/deploy-to-cloudflare . however, this doesn't support Prisma afaik....

Migrations and Build breaking after the new version of 6.6.0

From today morning, we are unable to deploy our services, intially we had issue of schema not found, rectified that issue based on the solutions on web. Now its not properly working with the seed. Can anybody help whether 6.0.1 is deprecated? Which version would be better suitable with minimal changes to migrate? ...

Schema could not be found after Prisma 6.6.0 update

Before 6.6.0, prisma generate was working completely fine. Now, it isn't able to find the schema file located in ./prisma/schema/schema.prisma I tried running the command with --schema to specify the location, and then the following is the result of that: ``` Environment variables loaded from .env...

Prisma Error After Nuxt 3.16.0 & Nitro 2.11.6 Update

Hey everyone,
after updating to Nuxt 3.16.0 and Nitro 2.11.6, I'm getting this error during build related to Prisma: TypeError [ERR_INVALID_MODULE_SPECIFIER]: Invalid module ".prisma" is not a valid package name imported from node_modules/@prisma/client/default.js There's also a deprecation warning:...

Prisma optimize in a project using the neon adapter fails on Env variable not found: DATABASE_URL

The neon setup works fine, but once I add optimize, I get this error: The error:
PrismaClientInitializationError: error: Environment variable not found: DATABASE_URL....

still getting Pulse recommendations

I'm still getting fairly consistent Prisma Pulse recommendations after generating my client. Is this intended? I thought it's discontinued....
No description

new guy with wierd error when deleting a record trough prisma studio

i got this message when deleting a record. same thing happens with prisma postgres.

Problem with importing 3D models on prisma

If i import a 3D model it will crash and back

Problem with importing 3D models

If i import a 3D model it will crash and back

prisma cli push runs without error, but db on console.prisma.io not updating?

Has this been reported before? I have followed instruction setup. My schema.prisma file looks like this: ...

Automatically create SQLite database and run Prisma migrations in Docker for Next.js app

I have a Dockerfile that builds a Next.js application using Prisma with a SQLite database. I'd like to know if there's a recommended or automated way to create the SQLite database file and run the necessary Prisma migrations directly inside the Docker container, before the Next.js app starts. What's the best practice to achieve this setup?
Solution:
Hey 👋 The most common approach is to run Prisma migrations as part of your application startup process. You can modify your Docker container's startup command to run migrations before starting the Next.js application. You can create a custom startup script or modify your package.json to run migrations before starting the application:...

Possible error in docs?

https://www.prisma.io/docs/guides/nextjs#25-set-up-prisma-client Here i copied the following: ```import { PrismaClient } from '@prisma/client' import { withAccelerate } from '@prisma/extension-accelerate' ...