Prisma

P

Prisma

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

Join

generated type

Hei guys. Can someone explain to me how i can access my schema model generated type( PostCreateInput). This is how im importing PrismaClient and Prisma object: import { PrismaClient, Prisma } from "../../prisma/generated/client"; This other way of importing PrismaClient is not working for me. import { PrismaClient } from "@prisma/client";...

Rust-Free Is 3x Slower

Has this been already reported? On a local Postgres database I was getting a massive number of transaction timeout messages running out seed script. Ended up with this config to avoid those. ``` new PrismaClient({ transactionOptions: { maxWait: 300000,...

Is Prisma ORM Free for Local Development with a Self-Hosted MySQL Database?

I am planning to use Prisma ORM on my local machine to interact with a local, self-hosted MySQL database. Will the core Prisma ORM tool be completely free to use for this purpose, or are there any associated costs or usage charges?"

User was denied access on the database `postgres`

The application cannot connect to the database. Commands like prisma migrate dev, prisma studio, and prisma db pull work. ``` SERVER_ERROR: [Error [PrismaClientKnownRequestError]:...

Guidance on migrating to Rust-free from TS?

We have a decently complex Prisma instantiation logic at the moment, but our bundle size is getting absolutely ridiculous at this point, our builds take ages to run and our IDEs are impossible to use so we really need to migrate from the Rust engine ASAP (our builds are failing). When I try to upgrade to the latest Prisma version, and start following the migratio - How do we handle our instatiation logic? We have a pretty complex setup here, and none of the examples really account for extension usage, typing, etc. ```...

Baselining migration still fails

Hi, we just baselined our database from the existing database, we have ran all the scripts needed, like diffing and the 0_init, and then we marked 0_init as applied. The issue is, with zero changes, we try to do prisma migrate dev and this seems to throw an error related to 0_init even though we just marked this as resolved? I was expecting to see something along the lines of no migrations to execute?...

Prisma migrations with old database getting issues.

Hey guys, we have a very large database, and we have done prisma db pull to pull down the structure into the schema.prisma file, and then we started moving stuff into a multi-file schema structure, nothing has been deleted/removed, just moved around. Currently though, when we do: prisma migrate dev it's telling us there are loads of missing tables, for context prisma generate is correct, and has all the existing tables, nothing is lost. But for some reason, asking prisma to migrate causes it to, essentially, not see the tables because they are in different folders? The configuration is correct and the multi-file stuff is correct as generate works... so unsure what is happening here?...

Confused about new generated output.

Why in new Prisma output, I have to choose between importing from client and browser files, whereas with the old version, I could just import from @prisma/client. I understand the difference, just not sure why it was possible to import from a single place before, but now it's not....

Can we commit the generated code thanks to Rust-free ORM?

First of all, thanks for the v6.16 release! https://github.com/prisma/prisma/releases/tag/6.16.0 Does this release allows us to commit the generated code to Git? (I've been waiting for this because I want to use TypedSQL without having to set up a DB in the CI environment)...

Is there any way to make Prisma ignore being inside docker?

I am in a docker container, and no matter how I connect, via code's terminal in a dev container, or a exec -it /bin/bash when I use prisma migrate dev --name UsernameToName I get the error : Error: Prisma Migrate has detected that the environment is non-interactive, which is not supported. This is making it impossible to make migrations, as my whole dev enviroment is inside adev container...

Prisma does nothing unless we use await

Hello. I don't use await when doing update() in Prisma because I don't want to wait. However, when I do this, Prisma doesn't perform the update.

Any wayt to avoid all downtime with prisma?

Back whenever, with hibernate when we dropped columns, we would 1. deploy app that no longer reads/writes columns and 2. run migration while live app is running to drop columns. Voila - no downtime for customers. In prisma, does this work? I suspect we keep adding breaking changes and doing this wrong but then I add a few columns locally and one of my other servers locally hitting same DB BREAKS!!!...

Trying to setup better auth

Following this guide https://www.prisma.io/docs/guides/betterauth-nextjs and using the following schema (generated): ``` generator client { provider = "prisma-client-js"...

Help with the new Prisma Config "Migrations" Field Missing

Hey everyone I'm trying to update my code and after running npm i I got Prisma version 6.11^ as part of the update. I knew they were going to deprecate the old method in package.json, but now I'm running into an issue. Every tutorial and the official docs mention a field called migrations in the defineConfig method but I can't find it anywhere. When I try to use it I get the following error:...
No description

help please

my cursor ai run database force reset command on my live database and because of that i lose my db data i was using free tier and about to upgrade please help me restore the database for current time please...

Trouble migrating the schema

Remote contains 3 migrations, same as my local. I have made some changes in the schema and I want to migrate it. But I'm getting this error. (Shown in first image). But the thing is the changed models shown in the image is not done by me. My friend made those changes but he made a mistake. Instead of migrating the changes. He did db push directly so the change is not registered in the migration history. But due to this I cannot push my changes in remote. ...
No description

Unexpected "export *" warning with Prisma 6.16 in monorepo setup

Hello 👋 I’m working in a monorepo with Prisma (v6.16.0) and since updating, my dev server is spammed with the following warning: ``` unexpected export *...

How to create a baseline for an existing prod DB: question about "resolve" step

I followed the steps here but I'm left with a question: https://www.prisma.io/docs/orm/prisma-migrate/workflows/baselining Step 4 is to run prisma migrate resolve, which "adds the target migration to the _prisma_migrations table and marks it as applied. " That seems to be running against my local dev DB. Do I also need to somehow resolve the new basline migration on the prod DB, so that it won't try to re-apply the initial migration to the existing prod DB?...

Prisma Studio long error text problem

please make the error text scrollable, if the text is long now I have to zoom out and make my screen so small to close it - and even with that the close button will be so small to press it, and for the error message I have to copy it and paste it to another place to read it Please guys fix it by making the text scrollable...
No description

Migrating from MariaDB to sqlite

I am currently migrating from mariadb to sqlite (both using prisma). I have multiple Decimal(20,8) values in my prisma schema file. Do i need to store the values as text or does the prisma sqlite client keep the high decimal precision?...