Prisma

P

Prisma

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

Join

Parallel Table Names using MuliSchema feature

I'm in the process of deploying some parallel models to new schemas so that we have a sandbox schema to work with until we're ready to do some data migration. I've learned that using the multischema feature doesn't include the schema name as part of the contraint names, so I've had to go through and use the map() function to rename all of my contraints so that they're namespaced to my new schema (e.g. {tablename}_{column_names}_fkey --> {schemaName}_{tablename}_{column_names}_fkey this has allowed me to deploy the parallel tables in a new schema, however when i reun npx prisma migrate dev i still have some outstanding changes that it's trying to apply and I can't figure out what i'm doing wrong or how to rememdy the issue. Curious if anybody has encountered issues with somethign like this ``` Drift detected: Your database schema is not in sync with your migration history. The following is a summary of the differences between the expected database schema given your migrations files, and the actual schema of the database....

I would like to implement native support for timestamp precision

This ticket is exactly the issue that I've been having: https://github.com/prisma/prisma/issues/15516 I have the time and would like to complete it. If there's anyone that has experience contributing to similar changes to Schema mappings in relation to queries, any help intuitions on where to start / similar tickets to look at. Thank you!!...

prisma-client provider can't be used with multiple generators

When running the generate command I get an error: ``` │ Loaded Prisma config from ".....\prisma.config.ts". │ Prisma config detected, skipping environment variable loading. │ Prisma schema loaded from prisma\schema...

P1001: Can't reach database server at api.mydomain.com:5432

Been debugging this for hours, nothing works - I'm using the exact same connection string via Psql and it works, I've double check encoding, open port, password, dns resolution, everything

@prisma_client_runtime_library.js?v=16686fa7:135 Uncaught (in promise) TypeError: __banner_node_url.

I upgraded to prisma 6.6.0 and getting this error randomly this morning in my browser. I'm using Bun with a turbo monorepo ```generator client {...

Specifying postgres schema while using a postgres database url

We use prisma migrations with an application that uses kysely, and some direct postgres queries. The application stores its data in a named postgres schema. Our application initializes our postgres pool with a database url, stored in an env var. However, it seems that in order to use prisma with a postgres schema we must append ?schema={name} to the url that is used by prisma to get prisma to understand that it ought to operate in a schema....

panicked at query-engine\query-engine-node-api\src\engine. Failed to deserialize constructor options

Hi guys. I have a shared prisma package setup in one repo, and 2 other repositories (frontend and server) that use the shared prisma package. This setup has been working very fine for a long time. but just today i added a new table and deployed the updated package (something i do every week). and it's craching my servers....
No description

ERROR: ALTER COLUMN TYPE is only implemented in the declarative schema changer

Hi all, i have a serious issue. I can't seem to run npx prisma migrate dev safely. For some reason my migration history has a change that was implemented on the 20241006 (20241006150212_added_our_platform_fee_to_store) Theres a sequence of three migration files the first creates the "our_platform_fee" -- ALTER TABLE "Store" ADD COLUMN "our_platform_fee" DECIMAL(65,30) NOT NULL DEFAULT 0.05; Then there is a migration which changes the TYPE...
No description

db push not working with new prisma.config `migrate` adapter

hey guys, anyone got db push to work with turso? getting ```...

Prisma 6.6.0 ESM with Nx Monorepo - Typescript type check failures

The message is too long, so the rest of it is in the replies Prisma: 6.6.0 Repo: monorepo using NX and esbuild version: 20.6.2 Package manager: pnpm with workspaces Type: module (ESM and not CommonJS)...

Sudden connection string issues

Hi, I have been working the the ORM for a while now and for seemingly no reason I recently encountered issues with my instance. When sending any request this error is thrown:...

PostgreSQL Replica Identity Error Despite DEFAULT Setting

I am encountering a persistent PostgreSQL error related to logical replication and REPLICA IDENTITY on my database, and I would appreciate your assistance investigating the replication configuration. Problem: When attempting to delete a record from our User table, which has cascading deletes (onDelete: Cascade) set up for related tables (including Session, ProviderProfile, Subscription, etc. via Prisma), the operation fails with the following error:...

Sudden issues after trying to access localhost with my nextjs app - no changes in code.

Hey! I randomly started getting this after running pnpm run dev to start my dev environment - it shows up after I actually try to enter the website. I did no changes to code whatsoever, it just started happening. I am using prisma client and prisma 5.17 and nextjs 14.2.25 - I was wondering if anybody here might have a clue on what could have happened? I don't know what more info I could provide right away so just ask away if needed. Thanks in advance ```...

Starter plan pay as you go

I'd like to prevent my database from getting paused on the starter plan. I have a new app and unpredictable usage so I'm not quite ready for pro. I'd rather just pay to cover anything that exceeds the free tier usage. So do I just need to add a payment method to prevent the pause or is there something else I need to do?...

Keep the possibility to pass an existing Pool to `@prisma/adapter-pg`

In 6.6.0, the DX of @prisma/adapter-pg was simplified that a pool is created for you, but I'd like to keep the ability to pass an existing pool myself.

TypeScript errors with new `prisma-client` generated client

Hello people! I have a small question: I tried to update a small project to use the new generated client feature. It runs fine and it all works as it should, but when I run tsc -b to perform type checking, it fails with
app/generated/prisma/client/client.ts:341:16 - error TS4094: Property '_brand_DbNull' of exported anonymous class type may not be private or protected. 341 export const DbNull = runtime.objectEnumValues.instances.DbNull...

Hey! I'm seeing some queries taking ages to load when doing select with distinct.

Prisma Client's distinct option does not use SQL SELECT DISTINCT. Instead, distinct uses: A SELECT query In-memory post-processing to select distinct...

How do I use Prisma w/ Cloudflare Hyperdrive + MySQL using Cloudflare Workers

Hi I wanted to use Prisma with Cloudflare Hyperdrive + MySQL on Cloudflare Workers. I searched online and found that someone is using postgres adapter for postgres database. But I can't find the same one for MySQL(like adapter-mysql or something). I also found https://github.com/sidorares/node-mysql2/pull/2289 mentioned on https://www.prisma.io/docs/orm/prisma-client/deployment/edge/deploy-to-cloudflare . however, this doesn't support Prisma afaik....

Migrations and Build breaking after the new version of 6.6.0

From today morning, we are unable to deploy our services, intially we had issue of schema not found, rectified that issue based on the solutions on web. Now its not properly working with the seed. Can anybody help whether 6.0.1 is deprecated? Which version would be better suitable with minimal changes to migrate? ...

Schema could not be found after Prisma 6.6.0 update

Before 6.6.0, prisma generate was working completely fine. Now, it isn't able to find the schema file located in ./prisma/schema/schema.prisma I tried running the command with --schema to specify the location, and then the following is the result of that: ``` Environment variables loaded from .env...