Prisma

P

Prisma

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

Join

PRISMA_SKIP_POSTINSTALL_GENERATE is Not Skipping Generate on yarn install

I am running into errors during dockerfile builds, in which I cannot reach the database. My soluition was to try using the environment variables. During yarn install it seems the generate command is still running....

prisma migrate dev - data lost

Hi. I am trying to migrate my updated schema to my database. But when I do I get the question: We need to reset the MySQL database... All data will be lost How can I migrate without losing all my data?...

How to create a field in model that only exist on the application layer

When declaring a field in prisma schema is there any decorator to not create a column in database for that field.

How to line wrap prisma cli output?

Prisma's cli output is cut off at the terminal width. How do I reveal what's hidden without making the terminal wider?
No description

Build error on enum type

Hello when building my docker image I'm getting an error at build time ``` Type error: Module '"@prisma/client"' has no exported member 'LeaveType'. 19.24...

Prisma Pulse - Setting Up ErrorInternal

I'm trying to connect my Postgres instance to use Prisma Pulse as an alternative to BullMQ. After setting up the recommended configuration (taken from the Railway template), I'm getting this error: "ErrorInternal - Something went wrong, please try again," with no additional context. Here’s the config I applied: ``` ALTER SYSTEM SET wal_level = logical;...

What is the best practice to deploy migrations to production on AWS RDS?

Hey! So I am using Prisma ORM and I was wondering what are the best practices regarding Prisma to deploy database migrations to production when using AWS RDS within a private subnet. There are some possible solutions but they all feel quite engineered so I was wonder if there was a straightforward best approach that you would recommend. ...

How to dynamically get relationships of a from a wrapper function?

I have a function that only returns the value of prisma like so: ```tsx findUniqueOrThrow(args: Prisma.SomethingFindUniqueOrThrowArgs) { return this.prismaService.something.findUniqueOrThrow(args);...

Accelerate - Which Neon Connection (Pooled or Direct)?

I'm connecting Accelerate to a Neon instance. There is an option to connect to their pooler. Which is the most performant connection to use? Curious what the implications are when I connect to the pooled instance.
Solution:
Hello @zeebs 👋 We would recommend using direct connection from Neon database. Accelerate is a connection pooler with caching capabilities, so you don't need to use the pooled connection string from Neon....

Error validating: This line is invalid. It does not start with any known Prisma schema keyword.

I'm getting a lot of errors when using prisma schema folder feature My main schema: ``` generator client { provider = "prisma-client-js"...
No description

Error handling

From Docs: P2001 "The record searched for in the where condition ({model_name}.{argument_name} = {argument_value}) does not exist" ...

Interactive Transactions: multiple round trips, or one?

Reading in multiple places that sequential transactions are completed via a single round trip to the database. Can anyone confirm if interactive transactions work the same way, or is 1 network trip per request?...

Timed out fetching a new connection from the connection pool.

Hey guys, I am using Next.js and Im trying to deploy my app to my Kubernetes Cluster which is using Prisma. I'll got this error, what could I do about this? Timed out fetching a new connection from the connection pool. More info: http://pris.ly/d/connection-pool (Current connection pool timeout: 10, connection limit: 5)...

Beginner Help

Hey guys, this is my first time working with backend and databases and im have a bunch of trouble, so I am using Prisma obiovusly and postgresSQL, with that being said im stuck on the step where i add my database connection string, i looked into older prisma videos but the User experience has changed since those videos so it doesnt have the same setup, if someone can help me setup the database id appreciate it.

prisma sqlserver timeout

anyone know how to increase timeout? i keep having (Current connection pool timeout: 10, connection limit: 3)...

MSSQL Include (Joins) Seem Case Sensitive

Observing the documentation, https://www.prisma.io/docs/orm/prisma-client/queries/case-sensitivity#microsoft-sql-server-provider and my knowledge of MSSQL I know that MSSQL is case insensitive. However, it has become apparent that prisma is some how forcing case sensitivity when using an include on a relationship. We observed this by having some legacy data that was lower case in one spot and a different case in another despite it being a FK. When doing a raw query this works as expected, but through prisma it fails with a null not allowed error message. ```model Locations...

error TS2339: Property 'riskRegister' does not exist on type 'PrismaClient<{ log: "query"[]; }, neve

Hello team, I am new in Prisma ORM, I am currently working on the project where I use NodeJs to build backend, locally I used Docker as my db, when I deploy for development (to allow other devs to test the API) I used render for deployment and database I created on Render Postgres, first when I was working on user model, everything went fine but when I push other feature and deploy, I got the error shown on the screenshot but locally everything is working fine. Please help me on how to solve the issue....
No description

unable to query the database with the SQLite libsql adapter

Hey folks I'm using SQLite as my preferred choice for the database during the development I will replace it with Turso in production so I installed following dependencies @libsql/client @prisma/adapter-libsql and changed my code db export code from this ```ts import { PrismaClient } from "@prisma/client"; const globalForPrisma = globalThis as unknown as {...
No description

The relation field on model is missing an opposite relation field on the model

Hey ya'll. Not sure how to describe this, so I'll just post my code and issue. ```schema generator client { provider = "prisma-client-js"...