Prisma

P

Prisma

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

Join

Change behavior of @updatedAt when upgrading from 5.21.1 to 6.5.0?

Hi, When upgrading from version 5.21.1 to 6.5.0 I noticed that some of my snapshot tests where failing to a change of order. Digging down I noticed that my records all have the same updatedAt value in version 5.21.1 and now different values in Prisma 6.5.0. I found this issue on GitHub: https://github.com/prisma/prisma/issues/22326. Was this basically resolved somehow? Unfortunately me and ChatGPT could not find a relevant commit that changes this behavior....

Prisma Select TypeError

ok - my issue might be unrelated: This works: ```js function manyFoo(select?: Prisma.fooSelect) {...

Is it possible to run migrations manually on the database server via raw SQL and not use Prisma?

Hi because I'm a bit stuck with migrations stalling and hanging due to Unsupported index of BM25, I am considering just running migrations on the database server manually via raw sql generated from prisma's migration files. i know its not the best thing to do but i gotta do what works. what are some of the implications of doing this?...

Prisma db pull Extremely Slow on Supabase with Custom Schema

Issue: Prisma db pull is extremely slow when introspecting a schema on Supabase. Details:
- Using PostgreSQL on Supabase
- Prisma version:...

Primsa Studio Help

Hi! I am just looking for some help with regards to prisma studio. I current have this model ```model Unit { id Int @id @default(autoincrement()) name String @unique...
No description

Module not found after v6.5.0 upgrade

After upgrading to v6.5.0 these errors occur. ``` ✔ Generated Prisma Client (v6.5.0) to ./node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@prisma/client in 63ms ...

How does Prisma ORM build select Top in SQL Server?

My problem, can reply this query SELECT TOP 1000 * FROM [User] ORDER BY [id] ASC OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY; ...

Empty migration when baselining a database

Hi I'm following this https://www.prisma.io/docs/orm/prisma-migrate/workflows/baselining to baseline a MariaDB database. ``` npx prisma migrate diff \ --from-empty ...

Migration just stalls and hangs.

sometimes, when i perform prisma migrate to either create a new migration or run migration, it just hangs. what are some of the reasons for that happening? we haven't gone production yet but this is super scary. it happens to me from a fresh database after like 2 or 3 days later. we do have a custom BM25 index. its scary because the only way to get migration to work again is if i do a complete drop database and start over....

DB migration does not work on Python Client with Prisma Postgres

I have created a project with prisma postgres for my python application. Following is an example prisma/schema.prisma ```...

Using prisma in a bun monorepo

I am using a bun based monorepo with bun workspaces. I have package called prisma for my prisma client and schema. If i try to run prisma generate, it fails with this error: ``` prisma db:generate $ prisma generate │ Environment variables loaded from .env...

Using prisma with two different databases.

I have a NextJS project using Prisma ORM with Microsoft SQL Server. I am trying to setup Prisma to work with two different SQL Server databases in the same project. I cannot seem to get it working. I keep getting an error: TypeError: The "path" argument must be of type string. Recieved undefined. Anyone have any idea?

How to maintain schema across two backends with single database

Let's say I have two backends, one for scraping and another as primary for crud operation. So how do i maintain the schema and migration across two backends and only need some schema in common.

migration of existing db to Prisma Postgress

I have an existing database (Postgress) that i would like to move to your Prisma postgress. I would like to backup (old db) and restore (to new db) the db. Is it possible? If yes, how? If no, how can i proceed? Thanks...

Workflow for getting your DB schema into production when using separate databases

Let's say I use separate databases in development and production. How do you push your schema changes into your production DB? Do you just run push or migrate after pulling the latest code from GitHub?...

Prisma setup on VPS

Hey, is it possible to use Prisma when my Next.js app and Postgres DB run on a VPS? How does Prisma connect to the DB in this case?

Relation missing in UncheckedCreateInput

I have this model: ``` model Configuration { appId String @unique...

Environment variables in .env file

I have a .env file ``` DB_HOST="main-rds.some-alphanumericstring.us-west-2.rds.amazonaws.com" DB_USER="admin"...

implement a multi-schema database architecture with Prisma for a B2B SaaS with multiple organization

I'm trying to implement a database architecture with separate schemas for a B2B SaaS application supporting multiple organizations. My desired setup is: - A public schema for user authentication (tokens, sessions) with next-auth and a global organizations table - An organization_template schema with pre-populated tables (roles, permissions, organization_details) - Dynamic creation of new schemas (organization1, organization2, etc.) by cloning the template when a new organization is created...

Prisma5.22.0 + Next.js on Kubernetes → intermittent invocation errors

I’m running a Next.js 14.2.23 app with Prisma ORM 5.22.0 and MongoDB Atlas Serverless. Locally everything works perfectly (I’m using the same Prisma schema pointed at a dedicated/dev cluster). In production (Kubernetes pods) I’m seeing invocation failures sometimes that crash the site. Does anyone know what happen with this?. I'll attach the full pod log and the prisma schema for your reference. 🖥 Environment • Prisma: 5.22.0 • Next.js: 14.2.23...
Next