Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.
Last release 2 days ago
01 Sep 2026
Ships fairly regularly
a new release about every 1 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
3 versions withdrawn
withdrawn after publishing
7 years old
10657 releases Β· first in 2020
One column per quarter.
Nothing published for this version
Today, we are issuing the 2.3.0 stable release.
The Prisma VS Code extension now helps you rename models, fields and enums:
<img src="https://user-images.githubusercontent.com/30771368/88035729-e1839b00-cb42-11ea-8c9d-039a2aaf8a61.gif" width="500px" />
prisma introspect until recently ordered all fields in models alphabetically. Starting with 2.3.0 it now picks up the order from the columns in your database table and uses that same order for the fields in your models in your Prisma schema file.
With 2.1.0 we introduced feature flags for Prisma Client, called "Experimental Features". The property in the schema has been renamed from experimentalFeatures to previewFeatures to better communicate what they actually are.
generator client {
provider = "prisma-client-js"
- experimentalFeatures = ["..."]
+ previewFeatures = ["..."]
}
In 2.3.0 we introduce distinct querying capabilities to Prisma Client. It allows you to query for distinct (unique) rows of a model. In other words: The fields you provide in the distinct argument will be duplicate free.
π Documentation: Distinct
Distinct querying needs to be enabled with the feature flag discintApi like so:
generator client {
provider = "prisma-client-js"
previewFeatures = ["distinct"]
}
Distinct is only a filter and doesn't change the return type of the findMany query.
const result = await prisma.user.findMany({
where: {},
distinct: ['name']
})
Please share your feedback on how this feature works for you. We are interested in both positive and negative feedback, so we know if this feature is already ready for production! (If encounter any problems, please open a new issue here).
In 2.3.0 we introduce a Middlewares API as a preview feature. It allows you to hook into the control flow of Prisma Client.
π Documentation: Middleware
Middlewares need to be enabled with the feature flag middlewares like so:
generator client {
provider = "prisma-client-js"
previewFeatures = ["middlewares"]
}
Here is an example that prints the execution time of a query made by Prisma Client:
const client = new PrismaClient()
client.use(async (params, next) => {
console.log('params', params)
const before = Date.now()
const result = await next(params)
const after = Date.now()
console.log(`Query ${params.model}.${params.action} took ${after - before}ms`)
return result
})
const data = await client.user.findMany({})
This will log the following:
params {
args: {},
dataPath: [],
runInTransaction: false,
action: 'findMany',
model: 'User'
}
Query User.findMany took 2ms
Middlewares allow you to both manipulate the params and the result.
They are called in an "onion" fashion. If you have multiple middlewares, this is the order of things being called:
const client = new PrismaClient()
client.use(async (params, next) => {
console.log('1')
const result = await next(params)
console.log('4')
return result
})
client.use(async (params, next) => {
console.log('2')
const result = await next(params)
console.log('3')
return result
})
Prints:
1
2
3
4
While Prisma Client's middlewares work a bit different, they're by inspired Koa's middlewares.
Please share your feedback on how this feature works for you. We are interested in both positive and negative feedback, so we know if this feature is already ready for production! (If encounter any problems, please open a new issue here).
Just a quick reminder: In version 2.1.0 we introduced two experimental features, namely connectOrCreate and transactionApi.
In 2.2.0 we introduced aggregateApi.
In case they're useful for you, please give them a try and let us know! They stay in preview in this release.
prismafile: is what works and sqlite: sqlite:// should errorwhereprisma -vpreviewFeatures as replacement for experimentalFeaturesprisma-client-jsselectmigratemigrate.lock file to avoid git history messenv("DATABASE_URL") freezes migrationsid)language-toolspost on Model foo must specify the fields argument in the @relation directive."@default attributes when they are functionsstudio0 instead of nullprisma-engines@default(autoincrement())Huge thanks to @RafaelKr for helping!
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Today, we are issuing the 2.2.2 patch release.
With 2.2.1 the wrong binary was released, this new patch fixes it.
The new binary hash from npx @prisma/[email protected] -v is a9e8c3d97ef2a0cf59256e6b26097f2a80f0a6a4
Nothing published for this version
Today, we are issuing the 2.2.1 patch release.
where #2959