Prisma

P

Prisma

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

Join

Scrolling Filters and Fields inside Prisma Studio

Hey there! I'm reaching out because of https://github.com/prisma/prisma/issues/26464: I just tried out most recent Prisma 6.9.0 and the issue seems to persist. So I have the following question: Is there a known workaround for this? So that we can scroll again and see all fields?...

Prisma ESM / tRPC 11 issue

Hi everyone! Key components of our stack: - Prisma 6.9.0 (with pg adapter)...

Prisma pull/push not working with PrismaPg adapter

I'm trying to use Prisma with GCP Cloud SQL so I have custom prisma.config.ts which uses PrismaPg and to make the connection. However on every push/pull command I get this error: ``` Error: Column type 'name' could not be deserialized from the database. 0: sql_schema_connector::flavour::postgres::describe_schema_with with circumstances=BitFlags<Circumstances>(0b100, CanPartitionTables) preview_features=BitFlags<PreviewFeature>(0b0) namespaces=None schema="public"...

Supabase Database w/ Prisma, not return `slug` column.

Hi, So I have the following model described with Prisma. ```...

Property 'validator' does not exist on type 'typeof Prisma'.

``` import Elysia from "elysia"; import { auth } from "../auth"; import { getService, getServices, updateService } from "@/database/service"; import { Prisma } from "@prisma/client";...

About transactions and extensions

I want to add custom methods to my model: ```ts export default Prisma.defineExtension((c) => return {...

Unable to create migration even after reset

When trying to create a migration I get the expected message that there is drift and to reset it. After performing the migrate reset command I still get the same message but telling me the only change is pg_crong being added....

`DATABASE_URL` invalid while `npx prisma migrate ...`??

``` Environment variables loaded from .env Prisma schema loaded from schema.prisma Datasource "db": PostgreSQL database ...
Solution:
@piscopancer url = env("DATABASE_URL") (without quotes)

Help with initializing

I've just created a new nextjs project and I ran the following commands: npm install -D prisma npx prisma init ...
No description

Seed with Next.js (no typescript) don't work

Hi, im Safwan I have the latest version of prisma, and i have a problem where i can't seed my database, the error: ``bash Running seed command node prisma/seed.js` ......

Unable to create migrations at all

Hi I've been trying to create a baseline migration for my project and I keep getting an error that drift being detected. Prisma essentially proceeds to just say that my entire schema is brand new. The problem is that no, there is no drift. I tried everything I could like prisma db pull which indeed shows that everything is identical. I must create a migration because I now have a need for SQL triggers so I don't really have the option to just not use them. Also I cannot do a reset because there is a lot of data in said database I need it to work in production 😅...

soft delete with unique constraint

Hello guys ! How to make username unique only for non-deleted users in Prisma? I'm using Prisma with postgres and I have a User model with a deletedAt field for soft deletes. I want to make sure that username is unique only when deletedAt is null (i.e., for active users). It's okay if deleted users have the same username. I tried this: @@unique([username, deletedAt])...
No description

PrismaClient has type 'any'

Hello there, what would cause new PrismaClient() returning type any? Is my TypeScript configuration wrong? Is my IDE messing with me? Or is this a bug? I'm on latest Prisma version....

Error: Missing data field (Value): 'created_at'; node:

After trying to use the new prisma query compiler - works with the standard rust engines, just not with the new query compiler.

Enum failed to apply cleanly to database

I'm having issues creating new migrations for my cockroachdb prisma layout. I have one migration named 20240119154759_tag_naming_update_grant_redef with the contents: ``` ALTER TYPE "ExampleType" ADD VALUE 'GRANT';...

Prisma Accelerate for local NextJS development

I'm looking the example repo here: https://github.com/prisma/prisma-examples/tree/latest/accelerate/nextjs-starter And trying to see how I should set this up for offline local development. I like there's no conditional imports, and would like to keep it that way. My question is what should be the DATABASE_URL when using Accelerate in local development?...

PrismaClient export from generated client.

Hey, this may be an irrelevant feature generally, but it's something I would really appreciate, which is can we try and make it so the client export is always defined as "PrismaClient", at the moment you can do:
import { PrismaClient } from './your/generated/client';
import { PrismaClient } from './your/generated/client';
...

Prisma config parser?

Does the Prisma library come with some kind of parser I can use? I am in need of being able to automatically discover the generated Prisma client, and need a way of parsing and reading the config file.

Prisma v6.9.0

I updated my prisma to v6.9.0 and all typesafe becomes any, which was not happening in 6.8.2

When using the @prisma/adapter-pg I get a module build fail trying to use the prisma client.

I have a turborepo next 14 monorepo that exports the prisma client into my front and back end apps from the database package. I have all my prisma dependencies installed there. I am getting:
Module build failed: UnhandledSchemeError: Reading from "cloudflare:sockets" is not handled by plugins (Unhandled scheme).
Module build failed: UnhandledSchemeError: Reading from "cloudflare:sockets" is not handled by plugins (Unhandled scheme).
Could this have to do with monorepo set up? and not having the postgres installed ...