Prisma

P

Prisma

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

Join

PrismaClientKnownRequestError: Invalid prisma.b2bTransaction.findUnique()

prisma table B2bTransaction exists in database cross-checked with the studio, but when try to use in hono on production, it gives this error:
PrismaClientKnownRequestError: Invalid prisma.b2bTransaction.findUnique() invocation: The table public.B2bTransaction does not exist in the current database.
PrismaClientKnownRequestError: Invalid prisma.b2bTransaction.findUnique() invocation: The table public.B2bTransaction does not exist in the current database.
...

Minecraft command block texture problem

I'm new to prisma 3D and i want to make a Minecraft animation with the wither storm and i couldn't figure out how to add textures and for awhile i figured out how to add textures but the problem is that it looks like this
No description

Production Migrations after Dev Migrations

Hello, I push my project to a GitHub repo, and I did an initial migration from my dev database and then did migrations after that. I had already hosted my app on Vercel though. My question, is how can I go about creating an initial migration for my production code if I already pushed my dev migrations to the GitHub repository that is then sent to Vercel? I think my dev migrations are in the repo the prod is using, so when I run the init prisma migration, the code throws an error. ...

Error: MongoDB error: An error occurred during DNS resolution: proto error: io error: A socket opera

https://github.com/prisma/prisma/discussions/14908 I found some solution online but this all doesn't work for me. Is there any other solution you can suggest? PrismaClientInitializationError:...

Error validating datasource `db`: the URL must start with the protocol `prisma://`

Hey, I've just tried to deploy my Node-Project to a Coolify Instance, but now I'll get the above error. I have set the DATABASE_URL in the environment variables to this: postgresql://postgres:pass@ip:5432/postgres what could be the problem there? before, it worked fine....

cloudflare pages + Prisma

Hi I'm trying to build a Next.js Full stack application with Cloudflare pages thus can you please share steps to configure the Prisma along with Postgres in cloudflare next on pages I had referred this documentation https://www.prisma.io/docs/orm/prisma-client/deployment/edge/deploy-to-cloudflare but was unable to understand the exact steps to be taken Thus please try to help me with this...

Help with `[optimize] HTTP 409 Conflict: There is no active recording to write queries to.`

I have a NextJS 14 site running in local development. However, I run it using next dev -p 3002 --experimental-https as I need SSL for local testing. I have a very straightforward Prisma setup. ```...

relation-queries-docs

Hi, I'm new, and I think I'm misunderstanding something in the docs, on this page: https://www.prisma.io/docs/orm/prisma-client/queries/relation-queries#filter-a-list-of-relations It states, "... the following query returns all users and a list of titles of the unpublished posts associated with each user:" ```...

How prisma handle with n+1 problem using relation strategy query instead of join?

My question is prisma handle the queries to handle the n+1 problem?

Use foreign key as primary key

I've implemented multi-table inheritance following your guide: https://www.prisma.io/docs/orm/prisma-schema/data-model/table-inheritance#multi-table-inheritance-mti My question: Is it possible to merge the foreign key and primary key on my child table? It's easier to query if the parent table (User) and child table (Admin) have the same id. But duplicating the ID is not great because it introduces room for mistakes. I tried it earlier and got an error....

How do I connect to mysql on host from inside a docker container?

things I've done: - I changed the bind-address to 0.0.0.0 so mysql would allow connetions from the docker network instead of limiting itself to 127.0.0.1 - To my docker-compose.yml, I added ```extra_hosts:...

Supabase/Prisma DB Issues

Hi all, We've noticed a few different issues with our postgres instance via Prisma (hosted in Supabase). We're having a hard-time identifying what's missing in order to fix these errors. Ideally, something is misconfigured / with your help, we can fix these issues. Database health wise, utilization on average seems healthy (but has spiked some days). We use Primsa as our ORM / many of these errors are in Prisma-speak Here are some of the errors we've seen:...

My items dont update on deletion.

This isnt a bug, its just bad coding on my side. page.tsx fetches the data from prisma serverside, then passes it through components such as VaultPage, and i just noticed when you DELETE items using the buttons in these client side components it does not revalidate the data until a reload. https://github.com/LockScript/Lockscript-Vault...

Prisma and Pothos integration using Raw SQL

I have a use case where a “prismaField” implements resolve which is based on Raw SQL because of full-text search usage. Let's say we are searching for users by name through full-text search. The key problem starts when I use Prisma Pothos.js integration to solve N+1 through relations. Code example from pothos.js prisma docs...

Transactions across Files

I have the following two calls, one a direct Prisma call and the other one a Service call which does multiple inner Prisma calls. ``` await prisma.comment.delete({ where: { id },...

TypeScript error when using select argument type

Hi, The following code snippet is working fine, ``` const results = await prisma.orders.findMany({ select: {...

Help creating computed fields

Hi! im trying to do an extension of PrismaClient so I can add a computed field. each pageItem has a relation of many-to-many with products, and each product have a type. I wish to generate a computed field named "isMerch" that its true when all the products it contain are of type "MERCH". Here is my approach, far from being usefull... ...

Strange type error in seeding file

I have a strange issue with my seeding file. ``` import { PrismaClient } from "@prisma/client"; import { v4 as uuidv4 } from "uuid";...

Postgis in Prisma Postgres

Hey 😄 Not sure if this has already been answered somewhere but is postgis supported in Prisma Postgres? I know its in early access but wanted to check when would that be available? The product looks great congrats to the team! 🥳...

Nonsense error on correctly structured query

Hi, I got this error in production complaining about values on a list for an "in" filter on a query: `` PrismaClientValidationError: Invalid prisma.backOrderQueue.findMany()` invocation:...