Prisma

P

Prisma

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

Join

Access dev.db from the command line

I'm trying to access the Prisma database that my JavaScript App uses from the command line. I'm a NOOB with Prisma. I tried sqlite on Ubuntu and it complained that the database was encrypted. Can I access/manipulate a Prisma database from a Linux command line, and if so how? I suspect that has already been answered somewhere ...

prisma generate doesn't work 6.7.0

When I do npx prisma it generate this error: Cannot read properties of undefined (reading 'filter') ``` generator client {...
No description

With PrismaORM 6.6 "DATABASE_URL" Cannot Be Found

I'm using SvelteKit. I've updated the schema to use the new ESM client build, but unless I directly export DATABASE_URL prior to running the image or even the local build, it runs into errors: ```error: Environment variable not found: DATABASE_URL. --> schema.prisma:9 | 8 | provider = "mysql"...

How to access the DMMF after version 6.6.0?

Hi, I had a script I was using that reading from Prisma.DMMF, but since the past couple updates, this code path no longer seems accessible... Is there a new way to work with the DMMF? Otherwise it's quite complicated to interact with the structure of your own database for anything...

Module build failed: UnhandledSchemeError: Reading from "cloudflare:sockets" is not handled

For some reason, when I use the @prisma/adapter-pg and pass my Postgres connectionString, I get the following error? What could cause this? I'm just running locally using next dev? ``` ○ Compiling /instrumentation ... ⨯ cloudflare:sockets...

prisma db restore .sql file

Is it possible to restore on prisma postgress db a .sql file? I cannot generate a .bak file

Prisma migrate deploy only first N migrations

Is there a way to run prisma migrate deploy for only first n migrations?

Spreading data object with foreing keys in update() does not allow unchecked input

Basically the title summarizes my problem. We have a model that has category relation so it has categoryId as a foreign key. We handle type safety and validation using typebox and then spread the input object in update's data object. Like this: ```ts await prisma.product.update({...

Prisma Client could not locate the Query Engine for runtime "rhel-openssl-3.0.x" error on deployment

Prisma works locally and I can invoke my server actions without any problem. However, when I deploy, I get `Unhandled Rejection: Error [PrismaClientInitializationError]: Prisma Client could not locate the Query Engine for runtime "rhel-openssl-3.0.x". We detected that you are using Next.js, learn how to fix this: https://pris.ly/d/engine-not-found-nextjs. ...

Typed Query parameters not generated

Hey community, I am trying out the typed query feature and run into a problem that might also be faulty usage by me. I got the following raw query file: ```sql -- @param {String} $1:text...

Dbo schema getting ignored in sql server

Hey I try to pull the database via prisma db pull with the following conf `generator client { provider = "prisma-client" output = "../../../../libs/omi/api/prisma/src"...

Prisma queries fail in production

Hello, I’m using @prisma/extension-accelerate with Expo Router API Routes (which run in Cloudflare Workers). I encounter the following error in my deployed API. The strange part is that sometimes it works, and sometimes it doesn’t. I’ve attached a screenshot showing how I instantiate Prisma....
No description

Error P6004 -Query did not produce a result within the maximum allowed execution time of 10 seconds

I've only been getting these errors today and it's a relatively small query of 100 rows. Example request id: 936ecc459e75ced6 or 936e844f69c34595. Would someone from the Prisma team be able to investigate these request IDs and see if the timeout is due to maybe connection pools or something else?...

Next.js and Prisma Issue.

How I can get rid of the prisma generate issue
No description

I keep getting this error Error in performIO: Driver

How do I solve this issue when using npx prisma db push with cloudflare Error in performIO: Driver...

Missing field enableTracing

I'm having a problem with prisma in the production server. It is working fine locally Error: ```thread '<unnamed>' panicked at query-engine/query-engine-node-api/src/engine.rs:76:45:...

Prisma seeding

I'm having an issue with my prisma seeding, idk what is happening, there is no 'g' whatsoever in any place, i've been struggling with prisma my whole week and it just keeps appearing errors after errors that makes no sense, ```// This is your Prisma schema file, // learn more about it in the docs: https://pris.ly/d/prisma-schema...
No description

Searching by null returns no results

Given an example model like this: ```ts model Item { name: String...

ExpressJs Transactions

Is there a best practices or best way to wrap all requests to an ExpressJS API server in a transaction. I would like to start a transaction for any request going to /api and then either commit on successfully return or rollback if an error occurs. If possible I would like this to be as transparent as possible. Is such a thing possible? Thanks!
Next