Prisma

P

Prisma

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

Join

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?...

Unable to use s3 binaries distribution for corporated environments

Hi Im having issues on using the s3 binaries mirror http://prisma-builds.s3-eu-west-1.amazonaws.com/, its having issues returning 403 generate npx prisma generate ...

With the new changes can @prisma/client be a development dependency?

- There is new prisma-client generator - There is no more rust engine - There is custom output for generated prisma code so we no longer import anything from node_modules - Also adapters ...

AnswerOverflow alternative to manage Discord forum

Hey team, big fan of Prisma here. I noticed your forum is synced to the web with AnswerOverflow. I’ve been working on Paladin (using Prisma hehe), which provides a cleaner, searchable view of forums and makes moderation from the web easier. If it’s something that could help, you can check it out here: Paladin. It’s completely free to use and can either complement your existing setup or run on its own. :cowboy:...

Edge/Cloudflare issue with new ts client: `Accelerate not set up` even if we definitely set it up

This is our stack: - Nuxt 4 app - Deployed on Cloudflare Workers - Prisma ORM + Prisma Postgres + Prisma Accelerate ...

TypedSQL and case

I need to create a TypedSQL query but it doesn't seem to be able to read case. Do I need to @map all of the parts of the model to snake_case?
Next