P
Prisma2mo ago
stamura

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) The reason I'm asking is that when I generated code in a Docker environment and a Mac environment, there were only very slight differences. There are only minor differences in the contents of generated/internal/class.ts, and all other code appears to be exactly the same. While these differences exist, I still can't commit the code - do you have any good solutions or idea for this? My code is as follows:
generator client {
provider = "prisma-client"
output = "../src/generated"
engineType = "client"
previewFeatures = ["strictUndefinedChecks"]
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client"
output = "../src/generated"
engineType = "client"
previewFeatures = ["strictUndefinedChecks"]
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
import { PrismaPg } from '@prisma/adapter-pg'
import { appConfig } from '@/appConfig.js'
import { PrismaClient } from '@/generated/client.js'

const adapter = new PrismaPg({ connectionString: appConfig.databaseUrl })

export const prisma = new PrismaClient({ adapter })
import { PrismaPg } from '@prisma/adapter-pg'
import { appConfig } from '@/appConfig.js'
import { PrismaClient } from '@/generated/client.js'

const adapter = new PrismaPg({ connectionString: appConfig.databaseUrl })

export const prisma = new PrismaClient({ adapter })
GitHub
Release 6.16.0 · prisma/prisma
Today, we are excited to share the 6.16.0 stable release 🎉 🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X! Prisma ORM This section contains all ...
5 Replies
Prisma AI Help
Prisma AI Help2mo ago
You selected to wait for the human sages. They'll share their wisdom soon. Grab some tea while you wait, or check out #ask-ai if you'd like a quick chat with the bot anyway!
stamura
stamuraOP2mo ago
↑difference between linux & mac
No description
Jamie Noir
Jamie Noir2mo ago
in prisma-examples they exclude generated code (look .gitignore), so i assume it's best practice. https://github.com/prisma/prisma-examples/tree/latest/generator-prisma-client
GitHub
prisma-examples/generator-prisma-client at latest · prisma/prisma-...
🚀 Ready-to-run Prisma example projects. Contribute to prisma/prisma-examples development by creating an account on GitHub.
Nurul
Nurul2mo ago
Generators (Reference) | Prisma Documentation
Generators in your Prisma schema specify what assets are generated when the prisma generate command is invoked. This page explains how to configure generators.
stamura
stamuraOP2mo ago
@Nurul (Prisma) Thanks. I found following description in the page you mensioned. So, the migration is still halfway through, correct?
In the future, you can safely include the generated directory in version control when Prisma ORM is fully transitioned from Rust to TypeScript.

Did you find this page helpful?