Prisma

P

Prisma

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

Join

Unable to connect Prisma to RDS database

I am deploying a beta version of my webapp to prod however I am unable to connect to my RDS db. I have tried multiple different engines (Aurora Mysql, Mysql 8.0.35, MariaDB 10.11.6) I keep getting the error "PrismaClientInitializationError: Authentication failed against database server at db-host, the provided database credentials for db-user are not valid" The credentials are definitely correct and I have tested connecting to the database without Prisma and it works perfectly fine. ...

Date field default value

I have a use case for a date field that has a default value, for the sake of the question, it'll be 1970-01-01. In my prisma file it is set as follows: ```...

when i do command 'npx prisma db pull', Can i pull specific table?

i have many unnecessary tables,, So, i want to pull specific tables when i do npx prsima db pull. is there functions?

Question about the schema model type

I have this model in my schema: model data { data1 String } As far as the docs say, the type string allow me the use of a varchar type of field, so i must be able to save numerics (Int) types with no problem, BUT when i try to do that the system throws error, im using next js with prisma want to know what problem coould be, any help will be heartly apreciated...

Redirected false error 400

I don't understand why I cannot create a document
Solution:
After some troubleshooting the problem was caused by a type error as prisma was being passed a string instead of an object. After parsing the json string there was a different type error introduced by using connect instead of idEnvelope.
No description

Typescript one to many relation

I'm trying to create a record like this: ```ts await db.limits.create({ data: { ...limit,...

Error in "create" logic ?

Hey ! I've noticed something while creating an object. This is my model: ```ts...
No description

Is Prisma still not working with RDS Proxy?

Is this limitation still true? https://www.prisma.io/docs/orm/prisma-client/deployment/caveats-when-deploying-to-aws-platforms#aws-rds-proxy If yes, what are the different solutions to use Prisma with AWS Lambda and a connection pool manager?...
Solution:
Yes, as far as we know even after semi-recent updates, it's still highly likely that connections would be pinned if you used RDS Proxy. Prisma Accelerate is one option and if you're okay with managing infrastructure, PgBouncer is a great option for PostgreSQL DBs

Prisma serverless-pg driver support

I am trying to use this driver (https://github.com/MatteoGioioso/serverless-pg) with postgress to run in a serverless environment (vercel). Was reccomended by vercel's own connection pooling doc (https://vercel.com/guides/connection-pooling-with-serverless-functions) . Anyone know if there's a way to use this driver or some other method to get around the connection limit issue on serverless.

AttributeError: module 'prisma.actions' has no attribute 'model_rebuild'

Hello guys, any idea how to solve this ? AttributeError: module 'prisma.actions' has no attribute 'model_rebuild' prisma to work but somehow it doesnt now, I get this on every command now until I do clean up ...

Order by relation field

Hi! Is there a way to sort recipes based on complexity translation? There is 3 complexities, each has an array of translations Some alternative solution might be to introduce a new field called "order" or similar starting from 1 to 3, and sort by that?...
No description

Safe to import Prisma in Client Component?

I was wondering if it's safe to import Prisma (namespace) from @prisma/client in a client component with the "use client" directive. Using NextJS btw.

Can not deploy my backend api that use bun as runtime and prisma for database to my vps server using

HI, I Can not deploy my backend api that use bun as runtime and prisma for database to my vps server using docker....
No description

Can't reach database server at localhost:5432

PostgreSQL 16, I'm implementing OpenAPI on Cloudfare Workers using TypeScript, I did an endpoint and it shows an error PrismaClientKnownRequestError: Invalid prisma.clientProfile.create() invocation: This request could not be understood by the server: {"type":"UnknownJsonError","body":{"code":"P6008","message":"Accelerate was not able to connect to your database. The underlying error is: Can't reach database server at localhost:5432\n\nPlease...

NestJS + prisma

Giving nestjs and prisma a go together for the first time but can't get it to run a migration or db push ``` // app.module.ts import { Module } from '@nestjs/common';...

ID needed in delete()?

I'm using Postgres and have a schema for Discord Members. To make it simple with join tables, the primary key (named sid) of the table is an auto-incrementing integer, then another unique index care of the guild ID and user ID combo. ``` model DiscordMembers { sid Int @id @default(autoincrement()) ...
No description

Argument transaction tx with prisma accerlate typescript error

Yo yo, so i have a very long transaction that i am wanting to break up, just for easier maintance. So i want to pass the transaction func as argument however i am getting typescript type mismatch. ( am guessing because of prisma accerlate) example: ...

Prisma try migrate a model that no exist.

Operating system: windows 10 64x Description:
When carrying out the migration, this model 'questions' is informed, which does not exist and prevents the migration from being carried out....