Eloquent's relations equivalent in Prisma?
While it doesn't make a big difference in DX, Eloquen's relations do save some time and make it fun to type those short DSL queries.
I haven't skimmed through the whole doc of Prisma, but is there an equivalent to what I described?...
db push stuck
hello! when running prisma db push it logs that the schema is loaded then logs the datasource then does nothing! what do I do?
Solution:
It happened to me some time ago, then I realized that the database port in the connection URL was incorrect. Try to check it.
Image storing
Hi everyone, I just want to know what is the best way to store images according to these info about the system I'm building.
- a user needs to have a profile picture.
- I need to store a number of images for each user.
- a user can create a post, and the post may have an image.
- The hero section of the app may have a dynamic image that the admin can change....
Introspecting an existing database doesn't handle join tables correctly
I'm in the process of adding Prisma to an existing project with a large existing database (originally created with Prisma 1). I've introspected the database and edited the schema so that the names of the relation fields are cased correctly. I then created an initial migration SQL file as per the guide and marked it as applied.
When I try to create a new migration, I keep getting errors telling me that ALL of my existing JOIN tables are incorrect:
```
Drift detected: Your database schema is not in sync with your migration history.
...
Troubles with prisma when deploying to fly.io
Im just finish my backend built with Bun, Elysia and Prisma and im about to deploy it on fly.io, but when i try to start my server i get the error of the image and my VM is shutdowned

Prisma keeps generating same migrations
Hmm, I am having some weird issue with my "Invoice" model.. whenever I generate a migration, it keeps adding these lines to the migrations, over and over... What could be the cause of this?
``SQL
-- AlterTable
ALTER TABLE Invoice MODIFY amountTotal DOUBLE NOT NULL DEFAULT (round(amountSubtotal + amountTax`, 2)),...Solution:
Solution: After using
prisma db pull I saw that the database returned these formulas without spaces, so I had to change those values in the prisma schema and now it seems to be okay ๐
Native types for enums
Hi,
I would like to add a native type to an enum field. Like that :
```
enum Role {
USER...
First time migration!
I'm workin on a project that's in production on a few servers (not all are in my control).
I want to add migrations to this project, and I'm wondering about 'Applying the initial migrations'.
Is the idea that I run this
npx prisma migrate resolve --applied 0_init in all of my production databases, or is this for the local one when I create the migration?...
SQLite with Prisma problems
Hello! I have app hosted on my VPS, its using Prisma with SQLite (before migrating to Postgres) but im getting some problems. When im trying to do operations after scraping (its using Puppeteer so its consuming a lot of resources on my VPS) and after scrapping process im trying to save data in DB, then im often getting these errors (On the screenshot). After reload apps with pm2 everything is ok. What may be issue? Its because i have too weak VPS (2core, 2gb Ram + 4gb swapped) or its just SQLite thing and Postgres should handle that?
If you need any more informations to help, please, tell me
Thanks ๐...

Why does no-body even react to my tiny bugfix? Is it wrong?
I created a super tiny bugfix for an issue with the types in one of the packages, but nobody even gave any feedback in nearly a month - I don't understand why.
https://github.com/prisma/prisma/pull/24916...
Prisma type generating doesn't work in Docker
Hi, I'm trying to build docker container for my node.js application but all the time it fails because when I try to build the application, it gives me errors saying that @prisma/client types are undefined. I'd be glad if someone helped me, I'm stuck with this.
Dockerfile:
```
FROM node:18-alpine...
Error: PrismaClient is unable to be run in the browser
Hi all. I have encountered the following problems:
When extending the Prisma client, adding the
$extends directive causes an application error โPrismaClient is unable to be run in the browser.โ.
A meaningful part of the stack:
@prisma/client@5.18.0...Migrate sqlite to postgres
Hello! Currently i have SQLite database with Prisma. I need to transfer it (with entire data) to Postgres, it is easily possible? Didnt found any article or smth ๐ฆ
find first on relation queries
Hey all, how do I run a find first but only on the relations of a query? For example I want to get all the users in my db, but only return the first result for their relation. Using the posts example from the docs, I would want to get all the users and only one post.
Looking for Prisma Implementation Partner who can help
We are new to Prisma and currently implementing it for our marketplace website. We need a consultant who can give us best practices around database migration conflicts especially when dealing with production data. Our tech stack is NestJS, Postgresql and GCP. Thanks.
Only partial telemetry available
Im trying to enable open telemetry on prosma but only getting partial data.
im getting
-
prisma:client:operation
- |->prisma:client:connect...accidental db push
A teammate changed the schema and ran
db push on an existing database instead of npx prisma migrate dev. Is there a way to retroactively create a migration that would allow rolling forward without resetting the database? The change was adding a single column - and if we need to drop that column that's fine but I'd like to avoid dropping the entire db.When updating a row with compound unique all the rows are updated with the same compound
Hi all
I have the following table
```prisma
model TransactionFee {
rate Float...

