Prisma 2.18.0stable Released Mar 02, 2021
Impact Score: 5/10

Prisma 2.18.0 — Release Notes & Engineering Impact

Source available — automated, not human-reviewed

Component: prisma · Channel: stable. Automated analysis, not a compatibility certification. How this works.

Analysis updated: 2026-11-01.

Compatibility not verified — check source notes
$ npm install --save-dev --save-exact [email protected]
📄 .MD
⚡ Executive Summary (TL;DR)

Prisma 2.18.0. Source highlight: Today, we are excited to share the `2.18.0` stable release 🎉

Who Does This Impact? (Role-Based Analysis)

💻 Software Engineers & Devs

Check the source notes against the package and APIs you use before upgrading.

📊 Product & Engineering Leads

Use the documented changes to assess relevance to your product; release frequency alone is not a quality measure.

⚙️ DevOps & Security

Verify the target version, runtime requirements and rollback procedure in the official documentation.

✨ New Features & Capabilities (5)

  • Add update of non-existent node to known errors
  • Add `prisma db pull` command for introspection
  • Add ability to unlink optional relation
  • Feature request: Being able to select entries to download/export as JSON
  • Add autocompletion for `shadowDatabaseUrl` in the datasource block

⚡ Performance & Enhancements (1)

  • Improve handling of unexecutable migrations in Prisma Migrate

🔧 Bug Fixes & Patches (1)

  • Improve on autogenerated bug report urls
📄 View Raw Release Notes (Original Developer Log)
Today, we are excited to share the `2.18.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%20@prisma%20release%20v2.18.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/2.18.0) about the release.** 🌟  ## Major changes & improvements ### `prisma introspect` is becoming `prisma db pull` In [`2.10.0`](https://github.com/prisma/prisma/releases/tag/2.10.0) we introduced the `prisma db push` command that enables developers to update their database schema from a Prisma schema file without using migrations. For the "opposite" motion (i.e., updating the Prisma schema from an existing database schema), we currently have the `prisma introspect` command. In this release, `prisma introspect` is being renamed to `prisma db pull`. However, the `prisma introspect` command will be kept around for a few more releases so that you have enough time to switch over to the new command. Here is how we are planning to execute the renaming: 1. In this release, we are introducing a new command `prisma db pull`, which behaves exactly the same as `prisma introspect`. 2. We will at some point in the near future add a deprecation warning to the `prisma introspect` CLI command. 3. Eventually, `prisma introspect` will be removed. There is no specific timeline to execute on this deprecation and we want to make sure we give developers a generous period of time to switch over. ### Relation syntax will not be updated automatically any more Prisma has a set of rules for defining [relations](https://www.prisma.io/docs/concepts/components/prisma-schema/relations) between models in the Prisma schema. The `prisma format` command automatically helps to apply these rules by inserting missing pieces. As an example, consider this data model with an _invalid_ relation: ```prisma model User { id String @id name String? posts Post[] } model Post { id String @id authorId String? author User? // not valid because the `@relation` attribute is missing } ``` This example is not valid because the [`@relation`](https://www.prisma.io/docs/concepts/components/prisma-schema/relations#the-relation-attribute) attribute is missing. Running `npx prisma format`, automatically inserts the missing attribute: ```diff model User { id String @id name String? posts Post[] } model Post { id String @id authorId String? + author User? @relation(fields: [authorId], references: [id]) } ``` In previous releases, this expansion logic was applied _automatically_ in several scenarios without running the formatter (by running `npx prisma format` explicitly, or formatting via VS code), e.g. when running `prisma migrate`. While helpful in some scenarios, these "magic" insertions often resulted in others errors that were harder to interpret and to debug for developers and ourselves. In this release, the "magical" instertions are removed and developers need to explicitly run `npx prisma format` if they want still make use of them. ### More flexible seeding in TypeScript The `ts-node` command options can now be customized via `package.json` to pass specific options to `ts-node`. This makes `prisma db seed` work with tools that have specific requirements when used with TypeScript, such as Next.js. Here is an example that works with Next.js: ```json { "name": "my-project", "version": "1.0.0", "scripts": { "ts-node": "ts-node --compiler-options '{\"module\":\"CommonJS\"}'" }, "devDependencies": { "@types/node": "^14.14.21", "ts-node": "^9.1.1", "typescript": "^4.1.3" } } ``` ### New Upsert API for Prisma Client Go Prisma Client Go now supports upsert operations: ```go post, _ := client.Post.UpsertOne( // query Post.ID.Equals("upsert"), ).Create( // set these fields if document doesn't exist already Post.Title.Set("title"), Post.Views.Set(0), Post.ID.Set("upsert"), ).Update( // update these fields if document already exists Post.Title.Set("new-title"), Post.Views.Increment(1), ).Exec(ctx) ``` Learn more in the [documentation](https://github.com/prisma/prisma-client-go/blob/master/docs/reference/10-upsert.md) and share your feedback in the [`#prisma-client-go`](https://app.slack.com/client/T0MQBS8JG/C015HGAQZ0D) channel on Slack. ## Fixes and improvements ### Prisma Client - [Error connecting to GCP cloud sql using ssl connection](https://github.com/prisma/prisma/issues/1228) - [Error opening a TLS connection: unknown Cert Authority](https://github.com/prisma/prisma/issues/2676) - [Filter based on number / count of relations](https://github.com/prisma/prisma/issues/3821) - [Issue with not closing DB connections](https://github.com/prisma/prisma/issues/4393) - [Errors at nested writes](https://github.com/prisma/prisma/issues/5012) - [Add update of non-existent node to known errors](https://github.com/prisma/prisma/issues/5032) - [Handle illegal parameters in raw SQL queries gracefully](https://github.com/prisma/prisma/issues/5077) - [Upsert not creating all entries](https://github.com/prisma/prisma/issues/5255) - [uncheckedScalarInputs: XOR not working?](https://github.com/prisma/prisma/issues/5294) - [Query produces `WHERE` clause with 1=0 as condition](https://github.com/prisma/prisma/issues/5575) - [User ID type instead of int to enable database transparency](https://github.com/prisma/prisma/issues/5601) - [Internal: Send Slack message for each CLI release](https://github.com/prisma/prisma/issues/5618) - [Improve on autogenerated bug report urls](https://github.com/prisma/prisma/issues/5656) - [$transaction should fallback to union if it can't give unwrap a proper output](https://github.com/prisma/prisma/issues/5688) - [Some exported types no longer available in Prisma namespace in 2.17](https://github.com/prisma/prisma/issues/5693) ### Prisma Migrate - [Error: [libs/datamodel/connectors/dml/src/datamodel.rs:175:14] Every RelationInfo should have a complementary RelationInfo on the opposite relation field. ](https://github.com/prisma/prisma/issues/4609) - [Empty index name: `ERROR: zero-length delimited identifier at or near """"`](https://github.com/prisma/prisma/issues/4701) - [Prisma Migrate: Better UX when referencing migrations in resolve command](https://github.com/prisma/prisma/issues/4750) - [Introspection crash when relation name is only used on one side. ](https://github.com/prisma/prisma/issues/4822) - [Annotated relation field doesn't appear to be required for 1-n relations](https://github.com/prisma/prisma/issues/4850) - [No validation error on 1:m ambiguous relation](https://github.com/prisma/prisma/issues/5069) - [Improve handling of unexecutable migrations in Prisma Migrate](https://github.com/prisma/prisma/issues/5163) - [Error: [libs/datamodel/connectors/dml/src/datamodel.rs:162:14] Every RelationInfo should have a complementary RelationInfo on the opposite relation field. ](https://github.com/prisma/prisma/issues/5342) - [Error using totvs database: `Couldn\'t parse default value`](https://github.com/prisma/prisma/issues/5423) - [Prisma format and issues with implicit relations](https://github.com/prisma/prisma/issues/5540) - [Migration Script Created With Foreign Key Fields in Wrong Order](https://github.com/prisma/prisma/issues/5589) - [Prisma seed incompatible with Nextjs et al. projects](https://github.com/prisma/prisma/issues/5622) - [Prisma Migrate - Drift detected error on each migrate run even when nothing changes in DB/Schema](https://github.com/prisma/prisma/issues/5687) - [When configuring `ShadowDatabaseUrl` to use Prisma Migrate in the cloud, a valid URL is always enforced across every environment, even though it's only needed in development.](https://github.com/prisma/prisma/issues/5704) - [Add `prisma db pull` command for introspection](https://github.com/prisma/prisma/issues/5836) - [ENUM in prisma migration](https://github.com/prisma/prisma/issues/5883) ### Prisma Studio - [Hiding a field, refreshing, then showing the field again is problematic](https://github.com/prisma/studio/issues/587) - [Add ability to unlink optional relation](https://github.com/prisma/studio/issues/615) - [Should be able to scroll filter column selection](https://github.com/prisma/studio/issues/627) - [Unable to reset `DateTime` field to `null`](https://github.com/prisma/studio/issues/632) - [Feature request: Being able to select entries to download/export as JSON](https://github.com/prisma/studio/issues/634) - [optional Int fields show NaN even if no values were entered](https://github.com/prisma/studio/issues/637) - [Argument id for data.id must not be null](https://github.com/prisma/studio/issues/638) - [Prisma Studio prevents saving changes when nullable values](https://github.com/prisma/studio/issues/639) - [Unable to deselect all relations](https://github.com/prisma/studio/issues/640) ### Language tools (e.g. VS Code extension) - [Add autocompletion for `shadowDatabaseUrl` in the datasource block](https://github.com/prisma/language-tools/issues/708) ### Prisma engines - [executeRaw does not work with updateMany mutation in transaction](https://github.com/prisma/prisma-engines/issues/1481) - [Migrate: catch soft reset errors in CLI](https://github.com/prisma/prisma-engines/issues/1646) ## 📝 Help us improve our release notes We want to ensure our release notes are as helpful as possible for you! You can help us achieve this by taking part in the poll in this [GitHub issue](https://github.com/prisma/prisma/issues/5913). ## 📺 Join us for another "What's new in Prisma" livestream Learn about the latest release and other news from the Prisma community by joining us for another ["What's new in Prisma"](https://www.youtube.com/watch?v=1Mul6jdmYvg&ab_channel=Prisma) livestream. The stream takes place [on Youtube](https://www.youtube.com/watch?v=1Mul6jdmYvg&ab_channel=Prisma) on **Thursday, March 04** at **5pm Berlin | 8am San Francisco**.