Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency prisma to v6 #639

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 27, 2021

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
prisma (source) 1.34.12 -> 6.0.1 age adoption passing confidence

Release Notes

prisma/prisma (prisma)

v6.0.1

Compare Source

v6.0.0

Compare Source

We’re excited to share the Prisma ORM v6 release today 🎉

As this is a major release, it includes a few breaking changes that may affect your application. Before upgrading, we recommend that you check out our upgrade guide to understand the impact on your application.

If you want to have an overview of what we accomplished since v5, check out our announcement blog post: Prisma 6: Better Performance, More Flexibility & Type-Safe SQL.

🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the release.

Breaking changes

⚠️ This section contains a list of breaking changes. If you upgrade your application to Prisma ORM v6 without addressing these, your application is going to break! For detailed upgrade instructions, check out the upgrade guide. ⚠️ 

Minimum supported Node.js versions

The new minimum supported Node.js versions for Prisma ORM v6 are:

  • for Node.js 18 the minimum supported version is 18.18.0
  • for Node.js 20 the minimum supported version is 20.9.0
  • for Node.js 22 the minimum supported version is 22.11.0

There is no official support for Node.js <18.18.0, 19, 21, 23.

Minimum supported TypeScript version

The new minimum supported TypeScript version for Prisma ORM v6 is: 5.1.0.

Schema change for implicit m-n relations on PostgreSQL

If you're using PostgreSQL and are defining implicit many-to-many relations in your Prisma schema, Prisma ORM maintains the relation table for you under the hood. This relation table has A and B columns to represent the tables of the models that are part of this relation.

Previous versions of Prisma ORM used to create a unique index on these two columns. In Prisma v6, this unique index is changing to a primary key in order to simplify for the default replica identity behaviour.

If you're defining implicit m-n relations in your Prisma schema, the next migration you'll create will contain ALTER TABLE statements for all the relation tables that belong to these relations.

Full-text search on PostgreSQL

The fullTextSearch Preview feature is promoted to General Availability only for MySQL. This means that if you're using PostgreSQL and currently make use of this Preview feature, you now need to use the new fullTextSearchPostgres Preview feature.

Usage of Buffer

Prisma v6 replaces the usage of Buffer with Uint8Array to represent fields of type Bytes. Make sure to replace all your occurrences of the Buffer type with the new Uint8Array.

Removed NotFoundError

In Prisma v6, we removed the NotFoundError in favor of PrismaClientKnownRequestError with error code P2025 in findUniqueOrThrow() and findFirstOrThrow(). If you've relied on catching NotFoundError instances in your code, you need to adjust the code accordingly.

New keywords that can't be used as model names: async, await, using

With this release, you can't use async, await and using as model names any more.


⚠️ For detailed upgrade instructions, check out the upgrade guide. ⚠️ 

Preview features promoted to General Availability

In this release, we are promoting a number of Preview features to General Availability.

fullTextIndex

If you use the full-text index feature in your app, you can now remove fullTextIndex from the previewFeatures in your Prisma schema:

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

If you use the full-text search feature with MySQL in your app, you can now remove fullTextSearch from the previewFeatures in your Prisma schema:

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

If you are using it with PostgreSQL, you need to update the name of the feature flag to fullTextSearchPostgres:

generator client {  
  provider        = "prisma-client-js"
- previewFeatures = ["fullTextSearch"]  
+ previewFeatures = ["fullTextSearchPostgres"]
}
New features

We are also releasing new features with this release:

Company news
🚀 Prisma Postgres is free during Early Access

In case you missed it: We recently launched Prisma Postgres, a serverless database with zero cold starts, a generous free tier, connection pooling, real-time events, and a lot more! It’s entirely free during the Early Access phase, try it now!

✨ Let us know what you think of Prisma ORM

We're always trying to improve! If you've recently used Prisma ORM, we'd appreciate hearing your thoughts about your experience via this 2min survey.

v5.22.0

Compare Source

Today, we are excited to share the 5.22.0 stable release 🎉

🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the release.

Highlights
Further Tracing Improvements

In our ongoing effort to stabilize the tracing Preview feature, we’ve made our spans compliant with OpenTelemetry Semantic Conventions for Database Client Calls. This should lead to better compatibility with tools such as DataDog and Sentry.

We’ve also included numerous bug fixes that should make this Preview feature easier to work with.

Metrics bug fix

Occasionally, connection pool metrics would become negative or grow unbounded. In this release, connection pool metrics should stay consistent.

Connection Pool Timeout fix

In a specific case, there could be issues where fetching a new connection from the connection pool would time out, regardless of the state of the application and connection pool. If you have experience connection pool issues accessing a PostgreSQL database with TLS encryption in a resource-constrained environment (such as Function-as-a-Service offerings or very small VPS) this should resolve those issues.

Special thanks to @​youxq for their pull request and help resolving this issue!

Join us

Looking to make an impact on Prisma in a big way? We're hiring!

Learn more on our careers page: https://www.prisma.io/careers

Fixes and improvements
Prisma Migrate
Prisma
Credits

Huge thanks to @​tmm1, @​Takur0, @​hinaloe, @​andyjy, and @​youxq for helping!

v5.21.1

Compare Source

  • Fixed a bug where migrations were not using shadow database correctly in some edge cases

v5.21.0

Compare Source

Today, we are excited to share the 5.21.0 release 🎉

🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the release.

Highlights
Better support for tracing in MongoDB

The tracing Preview feature now has full support for MongoDB with previously missing functionality now implemented. This is a part of the ongoing effort to stabilize this Preview feature and release it in General Availability.

tracing is a Preview feature that enables built-in support for OpenTelemetry instrumentation inside the Prisma Client and provides deep insights into the performance and timing of your queries. See our documentation for more information.

For an easy to use and zero-configuration tracing instrumentation tool with a dashboard that provides an overview of your queries, statistics, and AI-powered recommendations, try Prisma Optimize.

WebAssembly engine size decrease for edge functions

Due to recent changes, some users experienced a steep increase of the bundle size in Prisma 5.20 when using the driverAdapters Preview feature, going over the 1 MB limit on the free tier of Cloudflare Workers. This has now been fixed.

Fixes and improvements
Prisma Engines
Credits

Huge thanks to @​austin-tildei, @​LucianBuzzo, @​mcuelenaere, @​pagewang0, @​key-moon, @​pranayat, @​yubrot, @​skyzh for helping!

v5.20.0

Compare Source

🌟 Help us spread the word about Prisma by starring the repo or posting on X about the release. 🌟

Highlights
strictUndefinedChecks in Preview

With Prisma ORM 5.20.0, the Preview feature strictUndefinedChecks will disallow any value that is explicitly undefined and will be a runtime error. This change is direct feedback from this GitHub issue and follows our latest proposal on the same issue.

To demonstrate the change, take the following code snippet:

prisma.table.deleteMany({
  where: {
    // If `nullableThing` is nullish, this query will remove all data.
    email: nullableThing?.property,
  }
})

In Prisma ORM 5.19.0 and below, this could result in unintended behavior. In Prisma ORM 5.20.0, if the strictUndefinedChecks Preview feature is enabled, you will get a runtime error instead:

Invalid \`prisma.user.findMany()\` invocation in
/client/tests/functional/strictUndefinedChecks/test.ts:0:0
  XX })
  XX 
  XX test('throws on undefined input field', async () => {
→ XX   const result = prisma.user.deleteMany({
         where: {
           email: undefined
                  ~~~~~~~~~
         }
       })
Invalid value for argument \`where\`: explicitly \`undefined\` values are not allowed."

We have also introduced the Prisma.skip symbol, which will allow you to get the previous behavior if desired.

prisma.table.findMany({
  where: {
    // Use Prisma.skip to skip parts of the query
    email: nullableEmail ?? Prisma.skip
  }
})

From Prisma ORM 5.20.0 onward, we recommend enabling strictUndefinedChecks, along with the TypeScript compiler option exactOptionalPropertyTypes, which will help catch cases of undefined values at compile time. Together, these two changes will help protect your Prisma queries from potentially destructive behavior.

strictUndefinedChecks will be a valid Preview feature for the remainder of Prisma ORM 5. With our next major version, this behavior will become the default and the Preview feature will be “graduated” to Generally Available.

If you have any questions or feedback about strictUndefinedChecks, please ask/comment in our dedicated Preview feature GitHub discussion.

typedSql bug fix

Thank you to everyone who has tried out our typedSql Preview feature and provided feedback! This release has a quick fix for typescript files generated when Prisma Schema enums had hyphens.

Fixes and improvements
Prisma
Prisma Engines
Credits

Huge thanks to @​mcuelenaere, @​pagewang0, @​key-moon, @​pranayat, @​yubrot, @​thijmenjk, @​mydea, @​HRM, @​haaawk, @​baileywickham, @​brian-dlee, @​nickcarnival, @​eruditmorina, @​nzakas, and @​gutyerrez for helping!

v5.19.1

Compare Source

Today, we are issuing the 5.19.1 patch release.

What's Changed

We've fixed the following issues:

Full Changelog: prisma/prisma@5.19.0...5.19.x, prisma/prisma-engines@5.19.0...5.19.x

v5.19.0

Compare Source

Today, we are excited to share the 5.19.0 stable release 🎉

🌟 Help us spread the word about Prisma by starring the repo or posting on X about the release. 🌟

Highlights
Introducing TypedSQL

TypedSQL is a brand new way to interact with your database from Prisma Client. After enabling the typedSql Preview feature, you’re able to write SQL queries in a new sql subdirectory of your prisma directory. These queries are then checked by Prisma during using the new --sql flag of prisma generate and added to your client for use in your code.

To get started with TypedSQL:

  1. Make sure that you have the latest version of prisma and @prisma/client installed:

    npm install -D prisma@latest
    npm install @&#8203;prisma/client@latest
    
  2. Enable the typedSql Preview feature in your Prisma Schema.

       generator client {
         provider = "prisma-client-js"
         previewFeatures = ["typedSql"]
       }
    
  3. Create a sql subdirectory of your prisma directory.

    mkdir -p prisma/sql
    
  4. You can now add .sql files to the sql directory! Each file can contain one sql query and the name must be a valid JS identifier. For this example, say you had the file getUsersWithPosts.sql with the following contents:

    SELECT u.id, u.name, COUNT(p.id) as "postCount"
    FROM "User" u
    LEFT JOIN "Post" p ON u.id = p."authorId"
    GROUP BY u.id, u.name
  5. Import your SQL query into your code with the @prisma/client/sql import:

       import { PrismaClient } from '@&#8203;prisma/client'
       import { getUsersWithPosts } from '@&#8203;prisma/client/sql'
    
       const prisma = new PrismaClient()
    
       const usersWithPostCounts = await prisma.$queryRawTyped(getUsersWithPosts)
       console.log(usersWithPostCounts)

There’s a lot more to talk about with TypedSQL. We think that the combination of the high-level Prisma Client API and the low-level TypedSQL will make for a great developer experience for all of our users.

To learn more about behind the “why” of TypedSQL be sure to check out our announcement blog post.

For docs, check out our new TypedSQL section.

Bug fixes
Driver adapters and D1

A few issues with our driverAdapters Preview feature and Cloudflare D1 support were resolved via https://github.com/prisma/prisma-engines/pull/4970 and https://github.com/prisma/prisma/pull/24922

  • Mathematic operations such as max, min, eq, etc in queries when using Cloudflare D1.
  • Resolved issues when comparing BigInt IDs when relationMode="prisma" was enabled and Cloudflare D1 was being used.
Joins
Join us

Looking to make an impact on Prisma in a big way? We're now hiring engineers for the ORM team!

  • Senior Engineer (TypeScript): This person will be primarily working on the TypeScript side and evolving our Prisma client. Rust knowledge (or desire to learn Rust) is a plus.
  • Senior Engineer (Rust): This person will be focused on the prisma-engines Rust codebase. TypeScript knowledge (or, again, a desire to learn) is a plus.
Credits

Huge thanks to @​mcuelenaere, @​pagewang0, @​Druue, @​key-moon, @​Jolg42, @​pranayat, @​ospfranco, @​yubrot, @​skyzh for helping!

v5.18.0

Compare Source

🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟

Highlights
Native support for UUIDv7

Previous to this release, the Prisma Schema function uuid() did not accept any arguments and created a UUIDv4 ID. While sufficient in many cases, UUIDv4 has a few drawbacks, namely that it is not temporally sortable.

UUIDv7 attempts to resolve this issue, making it easy to temporally sort your database rows by ID!

To support this, we’ve updated the uuid() function in Prisma Schema to accept an optional, integer argument. Right now, the only valid values are 4 and 7, with 4 being the default.

model User {
  id   String @&#8203;id @&#8203;default(uuid()) // defaults to 4
  name String
}

model User {
  id   String @&#8203;id @&#8203;default(uuid(4)) // same as above, but explicit
  name String
}

model User {
  id   String @&#8203;id @&#8203;default(uuid(7)) // will use UUIDv7 instead of UUIDv4
  name String
}
Bug squashing

We’ve squashed a number of bugs this release, special thanks to everyone who helped us! A few select highlights are:

Fixes and improvements
Prisma
Language tools (e.g. VS Code)
Credits

Huge thanks to @​mcuelenaere, @​pagewang0, @​Druue, @​key-moon, @​Jolg42, @​pranayat, @​ospfranco, @​yubrot, @​skyzh, @​haaawk for helping!

v5.17.0

Compare Source

🌟 Help us spread the word about Prisma by starring the repo or tweeting 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

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

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)

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
Prisma
Language tools (e.g. VS Code)
Credits

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

v5.16.2

Compare Source

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

Fix in Prisma Client

v5.16.1

Compare Source

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

Fix in Prisma Client

v5.16.0

Compare Source

🌟 Help us spread the word about Prisma by starring the repo or tweeting 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.

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

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

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 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
Language tools (e.g. VS Code)
Prisma Engines
Credits

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

v5.15.1

Compare Source

Today, we are issuing the 5.15.1 patch release.

Fixes in Prisma Client

v5.15.0

Compare Source

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 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 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.
    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. If you try out prismaSchemaFolder, please let us know!

Interesting Bug Fixes
Fix for PostgreSQL prepared statement caching for raw queries

This release fixes a nasty bug with the caching of prepared statements in raw Prisma Client 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 on encountering certain multi-line CREATE DEFAULT, a deprecated way to define defaults in SQL Server. 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. 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, 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
Prisma Client
Language tools (e.g. VS Code)
Credits

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

v5.14.0

Compare Source

Today, we are excited to share the 5.14.0 stable release 🎉

🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the release. 🌟

Highlights
Share your feedback about Prisma ORM

We want to know how you like working with Prisma ORM in your projects! Please take our 2min survey and let us know what you like or where we can improve 🙏

createManyAndReturn()

We’re happy to announce the availability of a new, top-level Prisma Client query: createManyAndReturn(). It works similarly to createMany() but uses a RETURNING clause in the SQL query to retrieve the records that were just created.

Here’s an example of creating multiple posts and then immediately returning those posts.

const postBodies = req.json()['posts']

const posts = prisma.post.createManyAndReturn({
	data: postBodies
});

return posts

Additionally,createManyAndReturn() supports the same options as findMany(), such as the ability to return only specific fields.

const postBodies = req.json()['posts']

const postTitles = prisma.post.createManyAndReturn({
	data: postBodies,
	select: {
	  title: true,
	},
});

return postTitles

Note: Because createManyAndReturn() uses the RETURNING clause, it is only supported by PostgreSQL, CockroachDB, and SQLite databases. At this time, relationLoadStrategy: join is not supported in createManyAndReturn() queries.

MongoDB performance improvements

Previously, Prisma ORM suffered from performance issues when using the in operator or when including related models in queries against a MongoDB database. These queries were translated by the Prisma query engine in such a way that indexes were skipped and collection scans were used, leading to slower queries especially on large datasets.

With 5.14.0, Prisma ORM now rewrites queries to use a combination of $or and $eq operators, leading to dramatic performance increases for queries that include in operators or relation loading.

Fixes and improvements
Prisma Client
Prisma Migrate
Language tools (e.g. VS Code)
Company news
Prisma Changelog

Curious about all things Prisma? Be sure to check out the Prisma Changelog for updates across Prisma's products, including ORM, Accelerate, and Pulse!

Credits

Huge thanks to @​pranayat, @​yubrot, @​skyzh, @​anuraaga, @​gutyerrez, @​avallete, @​ceddy4395, @​Kayoshi-dev for helping!

v5.13.0

Compare Source

Today, we are excited to share the 5.13.0 stable release 🎉

🌟 Help us spread the word about Prisma by starring the repo or posting on X about the release.

Highlights
omit fields from Prisma Client queries (Preview)

We’re excited to announce Preview support for the omit option within the Prisma Client query options. The highly-requested omit feature now allows you to exclude fields that you don’t want to retrieve from the database on a per-query basis.

By default, when a query returns records, the result includes all scalar fields of the models defined in the Prisma schema. select can be used to return specific fields, while omit can now be used to exclude specific fields. omit lives at the same API level and works on all of the same Prisma Client model queries as select. Note, however, that omit and select are mutually exclusive. In other words, you can’t use both in the same query.

To get started using omit, enable the omitApi Preview feature in your Prisma schema:

// schema.prisma
generator client {
  provider        = "prisma-client-js"
  previewFeatures = ["omitApi"]
}

Be sure to re-generate Prisma Client afterwards:

npx prisma generate

Here is an example of using omit:

// Includes all fields except password
await prisma.user.findMany({
  omit: {
   password: true
  },
})

Here is an example of using omit with include:

// Includes all user fields except user's password and title of user's posts
await prisma.user.findMany({
  omit: {
   password: true
  },
  include: {
    posts: {
      omit: {
        title: true
      },
    },
  },
})
Expand to view the example Prisma schema
model User {
  id       Int     @&#8203;id @&#8203;default(autoincrement())
  email    String  @&#8203;unique
  name     String?
  password String
  posts    Post[]
}

model Post {
  id       Int    @&#8203;id @&#8203;default(autoincrement())
  title    String
  author   User   @&#8203;relation(fields: [authorId], references: [id])
  authorId Int
}

Many users have requested a global implementation of omit. This request will be accommodated in the future. In the meantime, you can follow the issue here.

📣 Share your feedback: omitApi Preview feature

📚 Documentation: omit - Prisma Client API Reference

Fixes and improvements
Prisma Migrate
Prisma Client
Credits

Huge thanks to @​ospfranco, @​pranayat, @​yubrot, @​skyzh, @​anuraaga, @​yehonatanz, @​arthurfiorette, @​elithrar, @​tockn, @​Kuhave, @​obiwac for helping!

v5.12.1

Compare Source

Today, we are issuing the 5.12.1 patch release to fix two small problems with our new Cloudflare D1 support.

Fixes in Prisma CLI
Windows-only fix for new D1 specific flags for migrate diff and db pull

The flags --from-local-d1 and --to-local-d1 for migrate diff and --local-d1 to db pull we added in 5.12.0 were not working as expected when running on Windows only. This is now fixed.

📚 Documentation: Deploying a Cloudflare worker with D1 and Prisma ORM

New option for migrate diff: -o or --output

We added a new parameter --output to migrate diff that can be used to provide a filename into which the output of the command will be written. This is particularly useful for Windows users, using PowerShell, as using >


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from eb59a7f to 424c8b6 Compare February 8, 2021 10:17
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 424c8b6 to 125ffaf Compare February 16, 2021 13:41
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 125ffaf to 3ef39e2 Compare March 2, 2021 15:06
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 3ef39e2 to 568b4ad Compare March 16, 2021 16:21
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from 3221bb9 to 6db2aeb Compare March 31, 2021 09:04
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 3 times, most recently from 1d457ab to fe68bbc Compare April 15, 2021 16:17
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from 738aa10 to a8668ea Compare May 7, 2021 10:17
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from a8668ea to 10682ec Compare May 19, 2021 09:44
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from b180921 to a74dd55 Compare June 3, 2021 18:14
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from a74dd55 to aa3ff03 Compare June 15, 2021 15:33
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from aa3ff03 to 85a14c9 Compare June 29, 2021 10:41
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 85a14c9 to 2ff8956 Compare July 13, 2021 13:24
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 2ff8956 to 564c4e3 Compare July 27, 2021 09:51
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from 899740b to 01fbaee Compare August 13, 2021 14:05
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 01fbaee to 64d070c Compare October 18, 2021 19:44
@renovate renovate bot changed the title chore(deps): update dependency prisma to v2 chore(deps): update dependency prisma to v3 Oct 18, 2021
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 64d070c to 84597f5 Compare March 7, 2022 09:43
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 84597f5 to a9e872e Compare March 26, 2022 12:52
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from a9e872e to 13bbcf9 Compare April 24, 2022 18:56
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 13bbcf9 to 04dfbef Compare May 15, 2022 19:55
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 04dfbef to 9c409d4 Compare June 18, 2022 13:51
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 9c409d4 to 2c2e8dc Compare September 25, 2022 12:44
@renovate renovate bot changed the title chore(deps): update dependency prisma to v3 chore(deps): update dependency prisma to v4 Sep 25, 2022
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from f6f522c to cadc8bc Compare December 18, 2023 19:45
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from b429529 to 9866e24 Compare January 15, 2024 14:00
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from 599edca to 912ff96 Compare February 1, 2024 17:35
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 3 times, most recently from 3b0cb5e to 654321a Compare February 21, 2024 19:54
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 654321a to a5852cb Compare March 12, 2024 14:28
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from 4bd6561 to 9224dd4 Compare April 4, 2024 16:41
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 9224dd4 to 4adbda8 Compare April 23, 2024 15:20
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 4adbda8 to 92a59f8 Compare May 14, 2024 19:54
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 92a59f8 to 0e3163f Compare June 4, 2024 16:05
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from 00c8d81 to e000851 Compare June 25, 2024 14:55
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from e000851 to 529f233 Compare June 27, 2024 19:05
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 529f233 to 29f32d6 Compare July 9, 2024 14:22
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 29f32d6 to b5d9467 Compare July 16, 2024 14:46
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from b5d9467 to e463d91 Compare August 6, 2024 16:56
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from 94b24d7 to f73b7b5 Compare September 2, 2024 16:37
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from f73b7b5 to 5695a4f Compare September 24, 2024 16:27
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from d4bff18 to e9343bf Compare October 17, 2024 19:01
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from e9343bf to c96bc4b Compare November 5, 2024 17:16
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from c96bc4b to cb77108 Compare November 28, 2024 19:00
@renovate renovate bot changed the title chore(deps): update dependency prisma to v5 chore(deps): update dependency prisma to v6 Nov 28, 2024
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from cb77108 to ea6ba61 Compare December 2, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants