Prisma

Latest version: v0.15.0

Safety actively analyzes 717349 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 24 of 44

2.4.0

Today, we are issuing the `2.4.0` stable release.

🌟 **Help us spread the word about Prisma by starring the repo ☝️ or [tweeting about the release](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20Prisma%20release%202.4.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/2.4.0)** 🌟

Major improvements

Order by multiple fields

A long-awaited feature - the ability to order by multiple fields in Prisma Client is finally here!

Until now you could only order by a single scalar field of a model. The API design however was already prepared for ordering multiple fields with the object syntax we have. Instead of just one property, that `orderBy` object can now have as many fields as you want! The order of the fields hereby determines the order of the returned list (see example below).

> **Note**: As this is an _incremental_ change in the API, we introduce this feature without a feature flag.

You can use it like so:

ts
// order by `age` descending and then by `name` ascending
const users = await prisma.user.findMany({
orderBy: {
age: 'desc',
name: 'asc'
}
})


As mentioned by the comment, the returned objects in `users` are ordered _first_ by `age` (descending), and _then_ by `name` (ascending).

πŸ“š **Documentation**: [Sort on multiple fields](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/sorting#sort-user-by-multiple-fields---email-and-role)

Top-level Client Methods: `$` dollar prefix for top-level Prisma Client methods

In recent versions, we introduced a couple of top-level methods in Prisma Client (e.g. `prisma.transaction()` and `prisma.use()`) in _preview_ mode. The immediate feedback was that the denylist for model names grew - which [breaks Prisma schemas](https://github.com/prisma/prisma/issues/3049) where a model is called `Transaction`, `transaction`, `use`, or `Use`. And the list goes on...

In order to have a future-proof API, that allows maximum expressibility in terms of model names, we decided to prefix all non-query methods with a dollar sign `$`. That means Prisma Client will from now on ship with the following methods:

Pre-existing

- `$disconnect`
- `$connect`
- `$on`
- `$queryRaw`
- `$executeRaw`

Still in preview

- `$use`
- `$transaction`

The preview methods have already been renamed, the pre-existing methods like `connect` are still available, you just get a deprecation warning. They will be available for a few more releases with an alias, so no hurry to update them yet.

<!-- > **Note**: The mental model here now becomes very simple - everything with a `$` comes from Prisma, everything without a `$` (e.g. `prisma.user.findMany()`) comes from your schema. -->

Updates in Prisma Studio

With this release, we shipped a number of improvements for Prisma Studio:

- Refreshed design
- Moved the _Reload_ button from the right of the databrowser to the left
- Moved the _Pending Actions_ bar from the bottom of the databrowser to the top right
- Removed the sidebar; to open a model, you can now press the _New Tab_ button on the top
- Removed the code editor
- Removed the tree view
- Added ability to view and edit JSON fields

Try out Prisma Studio in the [online demo](http://prisma.studio/) or in your Prisma project by running:


npx prisma studio --experimental


Preview features

Changes to `middlewares` and `transactionApi`

As mentioned above, we ar changing the names of some the top-level Prisma Client methods. This affects the two preview features [`middlewares`](https://github.com/prisma/prisma/issues/3107) and [`transactionApi`](https://github.com/prisma/prisma/issues/3104).

`middlewares`

You still need to enable the preview feature via the `generator` block in your Prisma schema to access it:

prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["middlewares"]
}


_Before_

ts
prisma.on()


_After_

ts
prisma.$on()


`transactionApi`


You still need to enable the preview feature via the `generator` block in your Prisma schema to access it:

prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["transactionApi"]
}


_Before_

ts
prisma.transaction()


_After_

ts
prisma.$transaction()


Already existing preview features from `2.1.0`, `2.2.0`, and `2.3.0`

Just a quick reminder:

- In version [`2.1.0`](https://github.com/prisma/prisma/releases/tag/2.1.0) we introduced two experimental features, namely `connectOrCreate` and `transactionApi`.
- In [`2.2.0`](https://github.com/prisma/prisma/releases/tag/2.2.0) we introduced `aggregateApi`.
- In [`2.3.0`](https://github.com/prisma/prisma/releases/tag/2.2.0) we introduced `middlewares` and the `distinctApi`.

In case they're useful for you, please give them a try and [share your feedback](https://github.com/prisma/prisma/issues/3108)! These features remain in preview in this release.

🌟 Help us spread the word about Prisma

To help spread the word about Prisma, we'd very much appreciate if you would **star this repo** 🌟 And if you're excited about the features in this week's release, then help us and [share it on Twitter](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20Prisma%20release%202.4.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/2.4.0).


Fixes and improvements
[`prisma`](https://github.com/prisma/prisma)

- [[Introspection] Do not print `default("")` for String fields](https://github.com/prisma/prisma/issues/1995)
- [Prisma introspect: extra field for self-relations](https://github.com/prisma/prisma/issues/2313)
- [Prisma 1 CLI (for versions smaller than 1.34) and Prisma 2.0 CLI share the same command](https://github.com/prisma/prisma/issues/2433)
- [Clarify schema comments](https://github.com/prisma/prisma/issues/2546)
- [`CreateInput` and `UpdateInput` have different typings for optional relations](https://github.com/prisma/prisma/issues/2839)
- [Loss of precision on Float fields](https://github.com/prisma/prisma/issues/2903)
- [pgbouncer=true flag not working as expected with a relation and enums on both sides of the relations](https://github.com/prisma/prisma/issues/2907)
- [Relation + enums + pgbouncer fails with a ConnectorError](https://github.com/prisma/prisma/issues/2921)
- [Implicit m-n relations have an extra `relation` field after introspection](https://github.com/prisma/prisma/issues/2947)
- [Supported feature combination coverage (MySQL + SQLite)](https://github.com/prisma/prisma/issues/2948)
- [Support setting a timeout for SQLite](https://github.com/prisma/prisma/issues/2955)
- [CLI won't run in AWS Lambda](https://github.com/prisma/prisma/issues/2980)
- [Prisma Client is generated twice when `output` is specified on `generator`](https://github.com/prisma/prisma/issues/3036)
- [[Re-Introspection] `map` and `map` with argument `name` loses the `name` after re-introspection](https://github.com/prisma/prisma/issues/3053)
- [Surface schema validation errors during Re-Introspection and change flow](https://github.com/prisma/prisma/issues/3082)
- [Validate uniqueness of names of indexes on databases which doesn't allow two indexes with the same name](https://github.com/prisma/prisma/issues/3099)
- [[Re-Introspection] Enum with `map` will get option commented if it invalid without map](https://github.com/prisma/prisma/issues/3119)
- [optional one-to-many relationship: none/every filters: Incorrect SQL generated](https://github.com/prisma/prisma/issues/3141)
- [Problems with middleware for tracing](https://github.com/prisma/prisma/issues/3148)
- [Self-referential one-to-one relationship. Incorrect SQL for `{ where: { non_fk_field: null } }`](https://github.com/prisma/prisma/issues/3153)


[`prisma-client-js`](https://github.com/prisma/prisma-client-js)

- [Ability to sort results by multiple attributes](https://github.com/prisma/prisma-client-js/issues/702)
- [Upsert should allow where clause with only undefined](https://github.com/prisma/prisma-client-js/issues/781)
- [AWS Lambda: Unknown error in Prisma Client](https://github.com/prisma/prisma-client-js/issues/789)


[`migrate`](https://github.com/prisma/migrate)

- [Migration ID timestamp issue](https://github.com/prisma/migrate/issues/536)


[`language-tools`](https://github.com/prisma/language-tools)

- [Add support for /* Prisma */ syntax highlighting](https://github.com/prisma/language-tools/issues/18)
- [Extension only release automation](https://github.com/prisma/language-tools/issues/143)
- [Publish Insider extension on every commit ](https://github.com/prisma/language-tools/issues/224)
- [Extension only sub-patch release process](https://github.com/prisma/language-tools/issues/240)
- [A patch release for CLI should be based on a tag and not master](https://github.com/prisma/language-tools/issues/246)
- [Dev instructions for working with language server are outdated.](https://github.com/prisma/language-tools/issues/285)
- [Streamline debugging of language server before published to npm](https://github.com/prisma/language-tools/issues/301)
- [Implement workaround for hanging types in LSP](https://github.com/prisma/language-tools/issues/315)
- [Run e2e tests before publishing on mac, windows as well](https://github.com/prisma/language-tools/issues/326)
- [Blank lines removed in model one by one in VS Code](https://github.com/prisma/language-tools/issues/333)
- [Syntax highlighting broken when using map attribute inside enum](https://github.com/prisma/language-tools/issues/339)
- [Formatting does not add missing relation automatically ](https://github.com/prisma/language-tools/issues/345)
- [Show previewFeatures in generator block as auto-completion suggestion](https://github.com/prisma/language-tools/issues/346)
- [unique only gets suggested once per model block](https://github.com/prisma/language-tools/issues/348)
- [Recognize usage of experimentalFeatures and give warning and quick-fix](https://github.com/prisma/language-tools/issues/355)
- [Using F2 on relation field leads to broken schema](https://github.com/prisma/language-tools/issues/359)
- [Snapshot tests for change-readme script](https://github.com/prisma/language-tools/issues/360)


[`studio`](https://github.com/prisma/studio)

- [Unifying model navigation](https://github.com/prisma/studio/issues/478)
- [Removing the tree view](https://github.com/prisma/studio/issues/479)
- [Removing the code editor & saved tabs](https://github.com/prisma/studio/issues/480)


[`prisma-engines`](https://github.com/prisma/prisma-engines)

- [Run test suite on postgres 13 beta in CI](https://github.com/prisma/prisma-engines/issues/755)
- [CI should build binaries for FreeBSD 12](https://github.com/prisma/prisma-engines/issues/852)
- [Improve error for nonexistent table](https://github.com/prisma/prisma-engines/issues/873)
- [Log if query engine is running in PgBouncer mode](https://github.com/prisma/prisma-engines/issues/877)
- [chore: Get rid of outdated dependencies](https://github.com/prisma/prisma-engines/issues/912)

2.3.0

Today, we are issuing the `2.3.0` stable release.

Major improvements

Rename helper tool in VS Code Extension

The [Prisma VS Code extension](https://marketplace.visualstudio.com/items?itemName=Prisma.prisma) 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" />

Introspection uses order of columns in table to order fields in model

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

Preview features

Renaming "Experimental features" to "Preview features"

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.

diff
generator client {
provider = "prisma-client-js"
- experimentalFeatures = ["..."]
+ previewFeatures = ["..."]
}


New: Distinct API

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](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/distinct)

Feature flag

Distinct querying needs to be enabled with the feature flag `discintApi` like so:

prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["distinct"]
}


Usage

Distinct is only a filter and doesn't change the return type of the `findMany` query.

ts
const result = await prisma.user.findMany({
where: {},
distinct: ['name']
})


Please [share your feedback](https://github.com/prisma/prisma/issues/2835) 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](https://github.com/prisma/prisma/issues/new/choose)).

New: Middlewares API

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](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/middleware)

Feature flag

Middlewares need to be enabled with the feature flag `middlewares` like so:

prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["middlewares"]
}


Usage

Here is an example that prints the execution time of a query made by Prisma Client:

ts
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:

bash
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:

ts
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:
bash
1
2
3
4


While Prisma Client's middlewares work a bit different, they're by inspired [Koa](https://koajs.com/)'s middlewares.

Please [share your feedback](https://github.com/prisma/prisma-client-js/issues/770) 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](https://github.com/prisma/prisma/issues/new/choose)).

Already existing preview features from 2.1.0 and 2.2.0

Just a quick reminder: In version [`2.1.0`](https://github.com/prisma/prisma/releases/tag/2.1.0) we introduced two experimental features, namely `connectOrCreate` and `transactionApi`.
In [`2.2.0`](https://github.com/prisma/prisma/releases/tag/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.

Fixes and improvements

[`prisma`](https://github.com/prisma/prisma)

- [[Re-Introspection] Keep order of models of existing Prisma schema](https://github.com/prisma/prisma/issues/1997)
- [Sort fields by the user's defined order not alphanumerically](https://github.com/prisma/prisma/issues/2434)
- [Add minimal integration test for studio](https://github.com/prisma/prisma/issues/2658)
- [Default value for relations](https://github.com/prisma/prisma/issues/2796)
- [Supporting querying distinct rows](https://github.com/prisma/prisma/issues/2835)
- [Omit full path when running prisma --version](https://github.com/prisma/prisma/issues/2882)
- [(Re)Introspection does not respect variables in dotenv file when schema is located in a custom directory](https://github.com/prisma/prisma/issues/2924)
- [Use denylist in Introspection already](https://github.com/prisma/prisma/issues/2940)
- [Clarify usage of datasource url when using SQLite - `file:` is what works and `sqlite:` `sqlite://` should error](https://github.com/prisma/prisma/issues/2941)
- [Postinstall hook fails with custom location for schema.prisma](https://github.com/prisma/prisma/issues/2944)
- [[Introspection] Pick up order of columns in database into schema](https://github.com/prisma/prisma/issues/2951)
- [Aggregate function is missing typing for `where`](https://github.com/prisma/prisma/issues/2959)
- [[2.2] Not loading ./prisma/.env variables when ./.env exists](https://github.com/prisma/prisma/issues/2971)
- [Rename the following items: - "model Transaction" after upgrade from 2.1 to 2.2](https://github.com/prisma/prisma/issues/3049)
- [Output feature flags in `prisma -v`](https://github.com/prisma/prisma/issues/3054)
- [Add `previewFeatures` as replacement for `experimentalFeatures`](https://github.com/prisma/prisma/issues/3055)

[`prisma-client-js`](https://github.com/prisma/prisma-client-js)

- [Investigate Amazon RDS Proxy](https://github.com/prisma/prisma-client-js/issues/676)
- [Improve automatically generated error reports](https://github.com/prisma/prisma-client-js/issues/744)
- [The ID's/techinique used to looked up nest relationships differs and results in a PANIC error, depending on what fields are included or not included in a `select`](https://github.com/prisma/prisma-client-js/issues/762)
- [Middlewares](https://github.com/prisma/prisma-client-js/issues/770)
- [Enum value 'false' breaks Prisma client create](https://github.com/prisma/prisma-client-js/issues/776)

[`migrate`](https://github.com/prisma/migrate)

- [Add linebreak at the end of `migrate.lock` file to avoid git history mess](https://github.com/prisma/migrate/issues/157)
- [Using `env("DATABASE_URL")` freezes migrations](https://github.com/prisma/migrate/issues/433)
- [Changing IDs in explicit n-m relationship results in no change](https://github.com/prisma/migrate/issues/468)
- [prisma/migrate makes react types required](https://github.com/prisma/migrate/issues/470)
- [Abort on unexecutable migrations](https://github.com/prisma/migrate/issues/471)
- [Null constraint violation on the fields: (`id`)](https://github.com/prisma/migrate/issues/498)
- [prisma/cli calling migrate save with a prisma schema error hangs indefinitely](https://github.com/prisma/migrate/issues/504)

[`language-tools`](https://github.com/prisma/language-tools)

- ["Error parsing attribute "relation": The relation field `post` on Model `foo` must specify the `fields` argument in the relation directive."](https://github.com/prisma/language-tools/issues/103)
- [Add Rename Helper Tool](https://github.com/prisma/language-tools/issues/245)
- [Try to execute the binary in the "is binary download needed?" check](https://github.com/prisma/language-tools/issues/253)
- [Keep root package.json version in sync with subfolders](https://github.com/prisma/language-tools/issues/282)
- [LSP should have its own test cases](https://github.com/prisma/language-tools/issues/286)
- [Separate vscode text/links from language server](https://github.com/prisma/language-tools/issues/297)
- [Check existing LSP version in CI before publishing](https://github.com/prisma/language-tools/issues/299)
- [CI fails if master changes during the run](https://github.com/prisma/language-tools/issues/309)
- [Validation for values of `default` attributes when they are functions](https://github.com/prisma/language-tools/issues/310)
- [Put caret into created model or enum after creating it via quick-fix](https://github.com/prisma/language-tools/issues/311)
- [Add quick-fix gif to README](https://github.com/prisma/language-tools/issues/312)
- [updatedAt not showing up for auto-completion](https://github.com/prisma/language-tools/issues/324)
- [Auto-completion adds too many quotation marks](https://github.com/prisma/language-tools/issues/325)
- [Formatter not working: Cannpt execute binary file](https://github.com/prisma/language-tools/issues/330)

[`studio`](https://github.com/prisma/studio)

- [How to navigate to related records?](https://github.com/prisma/studio/issues/103)
- [Loading state shows column titles later than actual empty table](https://github.com/prisma/studio/issues/433)
- [Console is full with ag-grid warnings](https://github.com/prisma/studio/issues/443)
- [Text editing operations shouldn't change based on data type](https://github.com/prisma/studio/issues/458)
- [Consider removing the delete button](https://github.com/prisma/studio/issues/459)
- [Can't select a related row in "add row" dialog](https://github.com/prisma/studio/issues/461)
- [Deleting required relation crashes](https://github.com/prisma/studio/issues/463)
- [Table view doesn’t show new field](https://github.com/prisma/studio/issues/466)
- [Adding relation in new record won’t load more than one record in other table](https://github.com/prisma/studio/issues/467)
- [Int fields are `0` instead of `null`](https://github.com/prisma/studio/issues/468)

[`prisma-engines`](https://github.com/prisma/prisma-engines)

- [Check whether the ForeignKeyDefaultDrop destructive change check is still needed](https://github.com/prisma/prisma-engines/issues/824)
- [[Introspection] Comment out Models that do not have a strict unique criteria](https://github.com/prisma/prisma-engines/issues/858)
- [Rust cuid() implementation may output more than 25 characters](https://github.com/prisma/prisma-engines/issues/878)
- [Examine our implementation of CUIDs](https://github.com/prisma/prisma-engines/issues/881)
- [Forbid to update int fields that are `default(autoincrement())`](https://github.com/prisma/prisma-engines/issues/885)
- [Parser Refactoring: Split Field type into RelationField and ScalarField](https://github.com/prisma/prisma-engines/issues/896)

Credits

Huge thanks to RafaelKr for helping!

2.2.2

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/cli2.2.2 -v` is `a9e8c3d97ef2a0cf59256e6b26097f2a80f0a6a4`

2.2.1

Today, we are issuing the `2.2.1` patch release.

Fixes and improvements

Prisma CLI
- [Not loading ./prisma/.env variables when ./.env exists 2971](https://github.com/prisma/prisma/issues/2971)

Prisma Client JS
- [Aggregate function is missing typing for `where` 2959 ](https://github.com/prisma/prisma/issues/2959)
- [Unable to generate Prisma Client with aggregateApi enabled 772](https://github.com/prisma/prisma-client-js/issues/772)

Studio
- Bug fixes

2.2.0

Today, we are issuing the `2.2.0` stable release.

Major improvements

Next to a lot of bug fixes, this version includes a number of new features!

Quick fix suggestions in Prisma VSCode Extension

The [Prisma VS Code extension](https://marketplace.visualstudio.com/items?itemName=Prisma.prisma) now helps you fix any accidental typos and offers more convenient ["Quick Fixes"](https://github.com/prisma/vscode/issues/227) right inside your editor.

<img src="https://imgur.com/SmgDmZM.gif" width="500px" />

Make datasource `provider` dynamic via environment variables

The `provider` field on the `datasource` defininitions in your Prisma schema now also accepts an _array_ of strings (instead of just a plain string). This can be helpful when you want to switch environments which point to different databases based on an environment variable. Learn more about this feature [here](https://github.com/prisma/prisma/issues/1487).

prisma
datasource db {
provider = ["sqlite", "postgres"]
url = env("DATABASE_URL")
}



Experimental features

Already existing experimental features

Just a quick reminder: In [`v2.1.0`](https://github.com/prisma/prisma/releases/tag/2.1.0) we introduced two experimental features, namely **`connectOrCreate`** and **`transactionApi`**. In case they're useful for you, please give them a try! They stay experimental in this release.

Re-Introspection

We were able to continue to improve the re-introspection flow based on your feedback. Thanks!

Aggregations API

While Prisma Client already provides a `count` query for each model, we now introduce further aggregation functionality for _number_ fields.

If your model has a field of type `Int` or `Float`, the following aggregations will be available:

- `sum`: Sum up all values of a field for the selected rows.
- `min`: Get the minimum value for a field for the selected rows.
- `max`: Get the maximum value for a field for the selected rows.
- `avg`: Get the average value for a field for the selected rows.

Example

Note, that the `count` API is always available, while `sum`, `min`, `max`, and `avg` are only available for a model if it has a number field.

<table>
<thead>
<tr>
<th>Prisma Schema</th>
<th>Prisma Client Query</th>
<th><pre>Result</pre></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<pre lang="prisma">
model User {
id Int id
age Int
name String
}
</pre>
</td>
<td>
<pre lang="js">
const result = await prisma.user.aggregate({
where: { age: { gt: 5 } }, // optional
count: true,
avg: {
age: true,
},
max: {
age: true,
},
min: {
age: true,
},
sum: {
age: true
}
})
</pre>
</td>
<td>

<pre lang="js">
{
"count": 10,
"avg": {
"age": 80
},
"max": {
"age": 163
},
"min": {
"age": 5
},
"sum": {
"age": 800
}
}
</pre>

</td>
</tr>
</tbody>
</table>

Feature flag

In order to enable this experimental feature, note that you need to set the feature flag `aggregateApi` in the Prisma Client generator block in your schema:

prisma
generator client {
provider = "prisma-client-js"
experimentalFeatures = ["aggregateApi"]
}


Please [share your feedback](https://github.com/prisma/prisma/issues/2838) 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](https://github.com/prisma/prisma/issues/new/choose)).


Fixes and improvements

`prisma`

- [Make datasource provider dynamic via environment variables](https://github.com/prisma/prisma/issues/1487)
- [Introspection doesn't recognize enums in PostgreSQL](https://github.com/prisma/prisma/issues/2548)
- [[Introspection] Investigate if our Introspection queries (can) return the correct order of columns](https://github.com/prisma/prisma/issues/2554)
- [PrismaClient throw error on missing is env even when overwriting database connection](https://github.com/prisma/prisma/issues/2609)
- [Pagination: cursor is ignored when using negative take argument](https://github.com/prisma/prisma/issues/2696)
- [Generator error hidden](https://github.com/prisma/prisma/issues/2722)
- [`prisma generate` throws exit code 0 in case of error caused by denied keywords](https://github.com/prisma/prisma/issues/2729)
- [.env not loaded when running `prisma migrate (save | up | down) --schema <file-path>`](https://github.com/prisma/prisma/issues/2735)
- [MySQL: Unreachable database host leads to unknown error](https://github.com/prisma/prisma/issues/2750)
- [Prisma format ignores newlines at the end of files](https://github.com/prisma/prisma/issues/2760)
- [Prisma introspection should add a trailing newline](https://github.com/prisma/prisma/issues/2768)
- [Introspection: Use env vars to override introspection binary with --url --print](https://github.com/prisma/prisma/issues/2773)
- [prisma/engine-core's package.json uses a github url for its version of undici](https://github.com/prisma/prisma/issues/2808)
- [Unify prisma introspect and prisma introspect --url wrt re-introspection](https://github.com/prisma/prisma/issues/2819)
- [Strange relation error message when running prisma generate ](https://github.com/prisma/prisma/issues/2832)
- [Support selections using basic aggregations](https://github.com/prisma/prisma/issues/2838)
- [Re-introspection error for renamed relations when there are multiple relations to the same table](https://github.com/prisma/prisma/issues/2844)
- [Introspection doesn't add or loses trailing new line of schema file](https://github.com/prisma/prisma/issues/2854)
- [UUID Cursor Pagination](https://github.com/prisma/prisma/issues/2855)
- [Schema validation: default(autoincrement()) on a String field should be rejected](https://github.com/prisma/prisma/issues/2865)
- [Switch to undici](https://github.com/prisma/prisma/issues/2890)
- [Introspect removes experimental features from schema](https://github.com/prisma/prisma/issues/2920)
- [Add new line checks to integration tests](https://github.com/prisma/prisma/issues/2926)


`prisma-client-js`

- [Add more integration tests for unhappy paths](https://github.com/prisma/prisma-client-js/issues/484)
- [Better error message when generated Client and local Prisma schema are out of sync](https://github.com/prisma/prisma-client-js/issues/586)
- [Multiple quick `count` requests result in `Invalid prisma.web_hooks.count invocation`](https://github.com/prisma/prisma-client-js/issues/670)
- [Wrong jsDocs annotations for `create` and `delete`](https://github.com/prisma/prisma-client-js/issues/726)
- [Raw API concerns](https://github.com/prisma/prisma-client-js/issues/727)
- [Improve sqlite error messages](https://github.com/prisma/prisma-client-js/issues/731)
- [JSON Filter does not work](https://github.com/prisma/prisma-client-js/issues/745)
- [Bulk Operations Naming Conflict ](https://github.com/prisma/prisma-client-js/issues/749)
- [Transaction API is not writing the transaction](https://github.com/prisma/prisma-client-js/issues/750)
- [Expose debug mode to trigger a panic for reproductions](https://github.com/prisma/prisma-client-js/issues/756)


`migrate`

- [`migrate up` tells me to read in `./migrations/MIGRATION_ID/README.md`](https://github.com/prisma/migrate/issues/172)
- [Create new SQL Database missing first char on name](https://github.com/prisma/migrate/issues/283)
- [`migrate save/up` hangs while creating database](https://github.com/prisma/migrate/issues/342)
- [`README.md` of migration folder includes `quaint` in SQL](https://github.com/prisma/migrate/issues/354)
- [Validate `default(now())` so that it only can be used in DateTime fields](https://github.com/prisma/migrate/issues/482)


`vscode`

- [Publish lsp server to npm](https://github.com/prisma/vscode/issues/112)
- [Quick Fix for fields with unknown types](https://github.com/prisma/vscode/issues/227)
- [Remove test cases that point to a four digit versioning scheme](https://github.com/prisma/vscode/issues/247)
- [Run integration tests on an extension release](https://github.com/prisma/vscode/issues/256)
- [Add instructions for each feature in README](https://github.com/prisma/vscode/issues/265)
- [Composite keys are not considered valid?](https://github.com/prisma/vscode/issues/266)
- [README on marketplace does not show Prisma Logo](https://github.com/prisma/vscode/issues/270)
- [Lerna bootstrap does not install all dependencies](https://github.com/prisma/vscode/issues/272)
- [Connection to server got closed. Server will restart.](https://github.com/prisma/vscode/issues/279)
- [Investigate `***` in GH action output](https://github.com/prisma/vscode/issues/288)


`studio`

- [Allow for column resizing](https://github.com/prisma/studio/issues/113)
- [Table scroll area should start underneath table header](https://github.com/prisma/studio/issues/195)
- [Select range of records when holding shift key](https://github.com/prisma/studio/issues/324)
- [Table's loading illustration may overlap with the table content](https://github.com/prisma/studio/issues/366)
- [Tooltips for table header columns](https://github.com/prisma/studio/issues/378)
- [Type to edit Enums and Booleans with autocomplete](https://github.com/prisma/studio/issues/383)
- [Copy & paste from a cell does not seem to work](https://github.com/prisma/studio/issues/417)
- [A better databrowser table](https://github.com/prisma/studio/issues/429)
- [In the "connect to X" view I would like to connect when clicking on a row](https://github.com/prisma/studio/issues/430)
- [Loading state shows unexpected data](https://github.com/prisma/studio/issues/432)
- [Scrolling down in relation accordion does not show entries](https://github.com/prisma/studio/issues/438)
- [After editing relation only the number of unsaved changes is shown in main table](https://github.com/prisma/studio/issues/439)
- [Styling of editing Int is different from editing String](https://github.com/prisma/studio/issues/440)
- [Loading state is not really indicated](https://github.com/prisma/studio/issues/447)


`prisma-engines`

- [Mask Datasource URLs in all artifacts generated by the Migration Engine](https://github.com/prisma/prisma-engines/issues/840)
- [Do not try setting database defaults for `default(dbgenerated())` fields.](https://github.com/prisma/prisma-engines/issues/844)
- [Multiple datasources in schema must be forbidden](https://github.com/prisma/prisma-engines/issues/869)

2.1.3

Today, we are issuing the `2.1.3` patch release.

Fixes and improvements

Studio
- Roll back new table view due to regressions

Page 24 of 44

Links

Releases

Has known vulnerabilities

Β© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.