Prisma

Latest version: v0.15.0

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

Scan your dependencies

Page 2 of 44

5.17.0

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

Highlights

VSCode extension improvements

We’re happy to introduce some cool new features that will make your experience with the Prisma VSCode extension even better!

**Find references across schema files**

The ability to hop between references of a given symbol is really useful in application code and now with the introduction of multi-file schema, we think it’s the perfect time to bring this feature to the VSCode extension!

With the 5.17.0 release, you’ll now have the ability to use the native “find references” feature to find any usage of a given symbol

![references](https://github.com/user-attachments/assets/b7d82584-2be7-4db6-bfd9-4dbe46f9e865)

**Added context on hover**

When hovering over a symbol that references a view, type, enum, or any other block with multiple values, you’ll now see a handy pop out that shows what is in that block at a glance.

![image](https://github.com/user-attachments/assets/b0dbc818-374b-4b6d-bda5-974d66efca65)

**Additional quick fixes**

We’ve taken some fixes made by the `prisma format` cli command and made them quick fixes available to the VSCode Extension. Now, when you have forget a back relation or relation scalar field, you’ll now see in real time what is wrong and have the option to fix it via the extension.

![image (1)](https://github.com/user-attachments/assets/931e8dff-2b1e-4da7-bd17-5b844d12804e)

QueryRaw performance improvements

We’ve changed the response format of `queryRaw` to decrease its average size which reduces serialization CPU overhead.

When querying large data sets, we expect you to see improved memory usage and up to 2x performance improvements.

Fixes and improvements

Prisma Client

- [Remove or change `This is the 10th instance of Prisma Client being started. Make sure this is intentional.` warning](https://github.com/prisma/prisma/issues/23736)

Prisma

- [Prisma generate option --allow-no-models doesn't work.](https://github.com/prisma/prisma/issues/24737)

Language tools (e.g. VS Code)

- [LSP Rename incorrectly maps field name and appends character](https://github.com/prisma/language-tools/issues/1771)


Credits

Huge thanks to key-moon, pranayat, yubrot, skyzh for helping!

5.16.2

Today, we are issuing the 5.16.2 patch release to fix an issue in Prisma client.

Fix in Prisma Client

- [nextjs app deployed to vercel edge can't import prisma WASM module ](https://github.com/prisma/prisma/issues/24673)

5.16.1

Today, we are issuing the 5.16.1 patch release to fix an issue in Prisma client.

Fix in Prisma Client

- [dotenv loading issue with PrismaClient ](https://github.com/prisma/prisma/issues/24634)
- [Prisma Seed Script Fails After Upgrading to v5.16.0 (DATABASE_URL Error)](https://github.com/prisma/prisma/issues/24658)

5.16.0

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

**Highlights**

Omit model fields globally

With Prisma ORM 5.16.0 we’re more than happy to announce that we’re expanding the `omitApi` Preview feature to also include the ability to **omit fields globally**.

When the Preview feature is enabled, you’re able to define fields to omit when instantiating Prisma Client.

tsx
const prisma = new PrismaClient({
omit: {
user: {
// make sure that password is never queried.
password: true,
},
},
});


You’re also able to omit fields from multiple models and multiple fields from the same model

tsx
const prisma = new PrismaClient({
omit: {
user: {
// make sure that password and internalId are never queried.
password: true,
internalId: true,
},
post: {
secretkey: true,
},
},
});


With both local and global `omit`, you now have the flexibility to completely remove sensitive fields while also tailoring individual queries. If you need the ability to generally omit a field except in a specific query, you can also overwrite a global omit locally

tsx
const prisma = new PrismaClient({
omit: {
user: {
// password is omitted globally.
password: true,
},
},
});

const userWithPassword = await prisma.user.findUnique({
omit: { password: false }, // omit now false, so password is returned
where: { id: 1 },
});


Changes to `prismaSchemaFolder`

In `5.15.0` we released the `prismaSchemaFolder` Preview feature, allowing you to create multiple Prisma Schema files in a `prisma/schema` directory. We’ve gotten [a lot of great feedback](https://github.com/prisma/prisma/discussions/24413) and are really excited with how the community has been using the feature.

To continue improving our multi-file schema support, **we have a few breaking changes** to the `prismaSchemaFolder` feature:

- When using relative paths in Prisma Schema files with the `prismaSchemaFolder` feature, a path is now relative to the file it is defined in rather than relative to the `prisma/schema` folder. This means that if you have a generator block in `/project/prisma/schema/config/generator.prisma` with an `output` of `./foo` the output will be resolved to `/project/prisma/schema/config/foo` rather than `/project/prisma/foo`. The path to a SQLite file will be resolved in the same manner.
- We realized that during migration many people would have `prisma/schema` as well as `prisma/schema.prisma`. Our initial implementation looked for a `.prisma` file first and would ignore the `schema` folder if it exists. This is now an error.

Changes to `fullTextSearch`

In order to improve our full-text search implementation **we have made a breaking change** to the `fullTextSearch` Preview feature.

Previously, when the feature was enabled we updated the `<Model>OrderByWithRelationInput` TypeScript type with the `<Model>OrderByWithRelationAndSearchRelevanceInput` type. However, we have noted that there are no cases where relational ordering is needed but search relevance is not. Thus, we have decided to remove the `<Model>OrderByWithRelationAndSearchRelevanceInput` naming and only use the `<Model>OrderByWithRelationInput` naming.

Fixes and improvements

Prisma

- [Wrong Parameterized Types Sent for SQL Server Queries](https://github.com/prisma/prisma/issues/17565)
- [`Prisma has no exported member named OrderByWithRelationInput. Did you mean OrderByWithAggregationInput?`](https://github.com/prisma/prisma/issues/21017)
- [[Driver Adapters]: missing provider compatibility validation](https://github.com/prisma/prisma/issues/21864)
- [Disable "Start using Prisma Client" hint logs on `prisma generate`](https://github.com/prisma/prisma/issues/22513)
- [Deploying prisma to CloudFlare pages using Nuxt/Nitro and node-postgres (pg) is using the wrong(vercel) wasm path](https://github.com/prisma/prisma/issues/23500)
- [`prisma/adapter-pg` modifies node-postgres global type parsers](https://github.com/prisma/prisma/issues/23505)
- [prisma/adapter-d1 is failing with an import error when called inside vitest tests](https://github.com/prisma/prisma/issues/23911)
- [`db pull` fails with `[libs\user-facing-errors\src\quaint.rs:136:18] internal error: entered unreachable code` on invalid credentials](https://github.com/prisma/prisma/issues/24268)

Language tools (e.g. VS Code)

- [Make prisma-fmt logs to work with language server](https://github.com/prisma/language-tools/issues/1193)
- [Spans and positions get shifted out of sync when schema includes multibyte characters](https://github.com/prisma/language-tools/issues/1308)
- [VSCode extension panics when opening an empty prisma schema](https://github.com/prisma/language-tools/issues/1760)

Prisma Engines

- [[DA] Planetscale engine tests: one2m_mix_required_writable_readable](https://github.com/prisma/prisma-engines/issues/4482)
- [[DA] Planetscale engine tests: apply_number_ops](https://github.com/prisma/prisma-engines/issues/4485)

Credits

Huge thanks to key-moon, pranayat, yubrot, skyzh, brian-dlee, mydea, nickcarnival, eruditmorina, nzakas, gutyerrez, avallete, ceddy4395, Kayoshi-dev, yehonatanz for helping!

5.15.1

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

Fixes in Prisma Client

- [internal error: entered unreachable code](https://github.com/prisma/prisma/issues/23407)
- [Got error 'internal error: entered unreachable code' when trying to perform an upsert.](https://github.com/prisma/prisma/issues/22947)
- [Prisma Client errors on SQLite with internal error: entered unreachable code when running 2 concurrent upsert ](https://github.com/prisma/prisma/issues/22725)
- [`ConnectionError(Timed out during query execution.)` during seeding](https://github.com/prisma/prisma/issues/21772)
- [SQLite timeouts after upgrade from prisma 2 to prisma 4](https://github.com/prisma/prisma/issues/17029)
- [`ConnectionError(Timed out during query execution.)` error when using `Promise.all` for SQLite](https://github.com/prisma/prisma/issues/11789)
- [Improve the error when SQLite database file is locked](https://github.com/prisma/prisma/issues/10403)
- [sqlite timeout error multiple queries run one after another](https://github.com/prisma/prisma/issues/10306)
- [SQLite times out during query execution when using `Promise.all()` / concurrent](https://github.com/prisma/prisma/issues/9562)
- [internal error: entered unreachable code](https://github.com/prisma/prisma/issues/24511)

5.15.0

Today, we are excited to share the `5.15.0` stable release 🎉

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

**Highlights**

Multi-File Prisma Schema support

Prisma ORM 5.15.0 features support for multi-file Prisma Schema in Preview.

This closes [a long standing issue](https://github.com/prisma/prisma/issues/2377) and does so in a clean and easy to migrate way.

To get started:

1. Enable the `prismaSchemaFolder` Preview feature by including it in the `previewFeatures` field of your `generator`.
prisma
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}

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


2. Create a `schema` subdirectory under your `prisma` directory.
3. Move your `schema.prisma` into this directory.

You are now set up with a multi-file Prisma Schema! Add as many or as few `.prisma` files to the new `prisma/schema` directory.

When running commands where a Prisma Schema file is expected to be provided, you can now define a Prisma Schema directory. This includes Prisma CLI commands that use the `--schema` option as well as defining schema via `package.json`

Our tooling has also been updated to handle multiple Prisma Schema files. This includes our Visual Studio Code extension and tools like database introspection, which will deposit new models in a `introspected.prisma` file. Existing models will be updated in the file they are found.

To learn more, please refer to our official documentation and [announcement blog post](https://www.prisma.io/blog/organize-your-prisma-schema-with-multi-file-support). If you try out `prismaSchemaFolder`, please [let us know](https://github.com/prisma/prisma/discussions/24413)!

Interesting Bug Fixes

Fix for PostgreSQL prepared statement caching for raw queries

This release fixes a [nasty bug with the caching of prepared statements](https://github.com/prisma/prisma/issues/22482) in [raw Prisma Client queries](https://www.prisma.io/docs/orm/prisma-client/queries/raw-database-access/raw-queries) that affected PostgreSQL when you ran the same SQL statement with differently typed paramters. This should not fail any more.

Fix for SQL Server introspection of (deprecated) **`CREATE DEFAULT`**

Our Introspection logic [crashed](https://github.com/prisma/prisma/issues/24275) on encountering certain multi-line `CREATE DEFAULT`, a [deprecated way to define defaults in SQL Server](https://learn.microsoft.com/en-us/sql/t-sql/statements/create-default-transact-sql?view=sql-server-ver15). As many SQL Server users are working with established databases, this happened frequently enough that we now explicitly ignore these defaults instead of crashing.

Fix for Cloudflare D1’s lower parameter limit

Cloudflare’s D1 has a lower parameter limit than local SQLite, which caused [bigger queries to fail](https://github.com/prisma/prisma/issues/23743). We adapted that limit to the D1 default for `prisma/adapter-d1`, which will avoid such failures.

Fix for Cloudflare D1’s different `PRAGMA` support

Our generated migration SQL for SQLite [did not always work for Cloudflare D1](https://github.com/prisma/prisma/issues/24208), because of differences in the supported pragmas. We adapted the SQL to work in both local SQLite and Cloudflare D1.

Fixes and improvements

Prisma Migrate

- [Crash on multiline defaults introspection on MSSQL](https://github.com/prisma/prisma/issues/10123)
- [Error: [libs\sql-schema-describer\src\mssql.rs:315:30] called `Result::unwrap()` on an `Err` value: "Couldn't parse default value: `create default [dbo].[member_notification_cancel_flags] as 0\r\n`" ](https://github.com/prisma/prisma/issues/10740)
- [Error: [libs\sql-schema-describer\src\mssql.rs:315:30] called `Result::unwrap()` on an `Err` value: "Couldn't parse default value: `create default d_password as 'D,73' `" ](https://github.com/prisma/prisma/issues/11010)
- [Crash introspecting MSSQL database with `DEFAULT`s](https://github.com/prisma/prisma/issues/11557)
- [doing introspection on a SQL Server 2018 DB - for Dynamic GP get the following error.](https://github.com/prisma/prisma/issues/14200)
- [Error: [libs\sql-schema-describer\src\mssql.rs:317:30] called `Result::unwrap()` on an `Err` value: "Couldn't parse default value: `\r\ncreate default D_BIT_OFF\r\nas 0\r\n`" ](https://github.com/prisma/prisma/issues/15704)
- [Error: called `Result::unwrap()` on an `Err` value: "Couldn't parse default value in SQL Server](https://github.com/prisma/prisma/issues/17069)
- [db pull errors on SQL Server with `Error: [libs\sql-schema-describer\src\mssql.rs:336:30] called `Result::unwrap()` on an `Err` value: "Couldn't parse default value: [...]`](https://github.com/prisma/prisma/issues/17104)
- [Error: [libs\sql-schema-describer\src\mssql.rs:336:30] called `Result::unwrap()` on an `Err` value: "Couldn't parse default value: `\r\ncreate default [va_nulla] as 0\r\n`" ](https://github.com/prisma/prisma/issues/17292)
- [Error when pulling from database](https://github.com/prisma/prisma/issues/19971)
- [Foreign key relation results in erroneous second migration](https://github.com/prisma/prisma/issues/23043)
- [`db pull` can't parse script setting default value](https://github.com/prisma/prisma/issues/23453)
- [Bug: Migrations not compatible with D1](https://github.com/prisma/prisma/issues/24208)
- [SQL Server Introspection crashes on multi-line (deprecated) defaults](https://github.com/prisma/prisma/issues/24275)

Prisma Client

- [Raw query failed. Code: `22P03`. Message: `db error: ERROR: incorrect binary data format in bind parameter 1`](https://github.com/prisma/prisma/issues/16611)
- [Float number on raw query: `incorrect binary data format in bind parameter 1`](https://github.com/prisma/prisma/issues/17110)
- [Can't use Prisma client in Next.js middleware, even when deploying to Node.js](https://github.com/prisma/prisma/issues/21310)
- [Prepared statement caching is data dependent on numeric input parameters (`incorrect binary data format in bind parameter x`)](https://github.com/prisma/prisma/issues/22482)
- [Turso Driver Adapter: Including `_count` leads to error](https://github.com/prisma/prisma/issues/23566)
- [Next.js app build fails when using Prisma with DB driver in Server Action](https://github.com/prisma/prisma/issues/23600)
- [Bug: [D1] Error in performIO: Error: D1_ERROR: too many SQL variables](https://github.com/prisma/prisma/issues/23743)
- [Remove `warn(prisma-client) This is the 10th instance of Prisma Client being started.` warning in Edge (and potentially) other envs)](https://github.com/prisma/prisma/issues/23763)
- [$executeRawUnsafe: `incorrect binary data format in bind parameter 6`](https://github.com/prisma/prisma/issues/23872)
- [Bug: Error or bug using Prisma with DriverAdapter with PostgreSQL database Neon](https://github.com/prisma/prisma/issues/23903)
- [`Inconsistent column data: Unexpected conversion failure from Number to BigInt` error when using `prisma/adapter-pg` ](https://github.com/prisma/prisma/issues/23926)
- [Incompatibility with NextJS app dir, CloudFlare Pages and D1](https://github.com/prisma/prisma/issues/23929)
- [Breaking change? `Int` switched to being `Int32` for MongoDB](https://github.com/prisma/prisma/issues/24262)

Language tools (e.g. VS Code)

- [VS Code extension is showing an advertisement](https://github.com/prisma/language-tools/issues/1732)
- [`Generate` codelens fails on Windows](https://github.com/prisma/language-tools/issues/1738)
- [We incorrectly read commented out preview features if they are before the real preview features](https://github.com/prisma/language-tools/issues/1741)

Credits

Huge thanks to pranayat, yubrot, and skyzh for helping!

Page 2 of 44

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.