Prisma

P

Prisma

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

Join

Is there a way to differently parse DateTime and db.Date when reading from Postgres

Both DateTime and db.Date are being parsed into a full Date in js. This causes unwanted behavior since the Day will shift for negative Timezones and hand-picking the affected fields for differenting handling is not a viable solution for me. I'd like a generic way to apply a different parsing strategy for different Database types...

Prisma & Store Procedures

Hello everyone, Does Prisma support calls to stored procedures? If so, could someone explain how to do it or share a relevant link, article, or repository with guidance?. PD: I use Postgres...

Having trouble connecting Prisma to Aurora AWS

running into error ``✖ Introspecting based on datasource defined in prisma/schema.prisma Error: P1001 Can't reach database server at postgres:5432`...

Prisma playground release date

Hi everyone, we are eagerly awaiting the release of the upgraded Prisma playground. When will it be available?

Eslint errors

After adding the generator client { provider = "prisma-client-js" output = "./prismaGenerated/client" }...

Relationship issue

Hey, I'm probably being super duper stupid here, but I am new to Prisma and I'm missing something. I have the schema: ```js model Ticket { id BigInt @id...

Opened PR to add ESM support to `@prisma/instrumentation`

Hi, I am back with another PR to the @prisma/instrumentation package: https://github.com/prisma/prisma/pull/26918 The package currently not shipping in ESM is currently blocking us from auto-instrumenting prisma in the Sentry SDK. It fixes a long-standing issue. Lemme know what you think....

'Too many clients' error when using NestJS and Jest even with a singleton Service

Is there a canonical example of how to create a PrismaService that can be used with Jest to do integration testing? I'm getting 'too many client' errors even with a PrismaService that uses a global client and using --runInBand. Does anybody have a exmaple of how to configure a PrismaService to use with NestJS and Jest?...

has no exported member error after updating to 6.6.0

I updated to version 6.6.0 and now I'm getting this error
No description

Hello I keep getting an error that I'm stuck on

```/home/thomas/Dev-Academy-Backup/plover-brief-voting/node_modules/.prisma/client/default.js:43 throw new Error('@prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.'); ^ Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to ...

Handling @db.Date fields client side from different Timezones (Postgres)

We have a database where some tables have date only fields (DateTime @db.Date) while others are regular DateTime fields. When the server sends this data then javscript will create a new Date() for both since we don't have a date only primitive there. This causes the @db.Date field which is stored as 2025-04-20 to be understood as a UTC 00:00 date. Therefore if I'm in New York which is -4h the date will result in 2020-04-19T20.00.000Z and the data will shift by one day in something like a calendar. We COULD simply say that all dates that we receive client side we add the current timezones offset so that it will then be correctly parsed as 2020-04-20T00.00.000Z. Then we woulc correctly have the beginning of the DB's date in the local timezone to correctly sort in the entry, BUT then we would mess up regular DateTime dates. A "createdAT" timestamp from 14:00 local NY time will come back to the same client with a 18:00 time which is WRONG....

Schema Troubleshooting

Hi everyone, i have a pretty simple Schema with three models. However, whenever i try to push the schema to my MYSQL DB, i keep running into foriegn key restraints. I don't see anything wrong with my relations thats causing this to occur. One thing to note is that i did accidentally migrate the schema to my db, but i went and dropped the table and the migration folder. Did I make a silly syntax mistake that i'm missing, or will i need to baseline my db due to migrations being out of sync?

full Text Search not working with Postgres and Nextjs

Hello, I have a problem with trying to use Full Text Search with Prisma ORM. I have followed the guide in Prisma docs, but I still get this error. I posted a snapshot of prima file and the code we have in the docs.
...
No description

SvelteKit __dirname is not defined in ES module scope

``` ReferenceError: __dirname is not defined in ES module scope This file is being treated as an ES module because it has a '.js' file extension and '/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension. at requireLibrary (file:///server/chunks/_server.ts-C8y8rTjF.js:51:5556) at file:///server/chunks/_server.ts-C8y8rTjF.js:221:21...

Enum mapped values in typedSQL

Hi! 👋 I’m having trouble using enums with mapped values in typedSql. Here’s what I have: ``` enum Status {...

Generate command not working

nwb-launcher@0.1.0 db:generate C:...\gitrepos\repo prisma generate
Environment variables loaded from .env Prisma schema loaded from prisma\schema.prisma...
Solution:
Solved, it did not like my output folder

prisma migrate dev (prisma+postgres://accelerate.prisma-data) P1011: Error opening a TLS connection

Hi team, I have setup a prisma-data db and recently I'm getting error when prisma migrate, don't know if it's something of my computer setup or it's happening to others. pnpm prisma migrate dev Environment variables loaded from .env...

Why do I have both `@prisma/client` and `generated/prisma/client` in my import suggestions?

Hello, first off the docs say: "The install command invokes prisma generate for you which reads your Prisma schema and generates a version of Prisma Client that is tailored to your models."...

go sdk?

big fan of yours, theres a chance to see this is go ?