Skip to content

Upgrade prisma: 2.26.0 → 2.28.0 (minor)

Depfu Bot requested to merge depfu/update/yarn/prisma-2.28.0 into main

Welcome to Depfu 👋

This is one of the first three pull requests with dependency updates we've sent your way. We tried to start with a few easy patch-level updates. Hopefully your tests will pass and you can merge this pull request without too much risk. This should give you an idea how Depfu works in general.

After you merge your first pull request, we'll send you a few more. We'll never open more than seven PRs at the same time so you're not getting overwhelmed with updates.

Let us know if you have any questions. Thanks so much for giving Depfu a try!


Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.

What changed?

️ prisma (2.26.0 → 2.28.0) · Repo
Release Notes

2.28.0

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

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

MongoDB improvements 🚀

Thanks to your feedback, we fixed a handful of bugs reported on the MongoDB connector (Preview):

  • Concurrent findUnique queries leading to an error #8276
  • Filtering by relations wasn't working properly #7057
  • Filtering on an array of IDs #6998

Please keep reporting issues to our team and help to bring MongoDB support closer to GA!

Prisma Adopts Semantic Versioning (SemVer)

We are adjusting our release policy to adhere more strictly to Semantic Versioning.

In the future, breaking changes in the stable development surface i.e. General Availability will only be rolled out with major version increments.

You can learn more about the change in the announcement blog post.

Create new Prisma projects in under 3 minutes

The latest release of the Prisma Data Platform enables you to create new Prisma projects and provision a database in under 3 minutes.

The Prisma Data Platform already allows you to:

  • Explore data in the database using the data browser.
  • Add other users to it, such as your teammates or your clients.
  • Assign users one of four roles: Admin, Developer, Collaborator, Viewer.
  • View and edit your data collaboratively online.

The new onboarding flow makes it possible to get started with Prisma quickly for new Prisma projects! 🚀

When creating a new Prisma project, the Prisma Data Platform allows you to:

  • Choose a Prisma schema from a selection of our templates.
  • Create a free PostgreSQL database on Heroku.
  • Populate the database with seed data.

If you already have a Prisma project, you can continue to import it from GitHub and connect it to your database.

This whole process now takes less than 3 minutes to set up, so we’re looking forward to seeing how you will use this feature for your prototyping and production needs.

If you have any issues or questions, let us know by opening a GitHub issue.

Quick overview

If you have a Heroku account, we can create a free Postgres database for you:

Prisma cloud onboarding

Start your project with a schema from our templates:

schema_templates

Interested in Prisma’s upcoming Data Proxy for serverless backends? Get notified! 👀

Database connection management in serverless backends is challenging: taming the number of database connections, additional query latencies for setting up connections, etc.

At Prisma, we are working on a Prisma Data Proxy that makes integrating traditional relational and NoSQL databases in serverless Prisma-backed applications a breeze. If you are interested, you can sign up to get notified of our upcoming Early Access Program here:

https://pris.ly/prisma-data-proxy

Fixes and improvements

Prisma Client

Prisma Migrate

Prisma Studio

Credits

Huge thanks to @ShubhankarKG, @hehex9 for helping!

📺 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" livestream.

The stream takes place on Youtube on Thursday, July 15 at 5pm Berlin | 8am San Francisco.

2.27.0

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

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

Major improvements & new features

MongoDB is Now in Preview 🎉

We're thrilled to announce that Prisma now has Preview support for MongoDB. Here's how to get started:

Inside your schema.prisma file, you'll need to set the database provider to mongodb. You'll also need to add mongoDb to the previewFeatures property in the generator block:

// Set the database provider to "mongodb"
datasource db {
  provider = "mongodb"
  url      = env("DATABASE_URL")
}

// We want to generate a Prisma Client // Since mongodb is a preview feature, we need to enable it. generator client { provider = "prisma-client-js" previewFeatures = ["mongoDb"] }

// Create our Post model which will be mapped to a collection in the database. // All posts have a required title, slug and body fields. // The id attributes tell Prisma it's a primary key and to generate // object ids by default when inserting posts. model Post { id String @id @default(dbgenerated()) @map("_id") @db.ObjectId slug String @unique title String body String }

Next, you'll need to add a database connection string to your .env file. We recommend using MongoDB Atlas to spin up a MongoDB database for free. Set the DATABASE_URL to the connection string you got from MongoDB Atlas, it should be similar to the following string:

DATABASE_URL="mongodb+srv://admin:<password>@cluster0.quvqo.mongodb.net/myFirstDatabase?retryWrites=true&w=majority"

️ Don't forget to include the username and password you set while creating the database in the connection string, otherwise you won't be able to connect to it.

Then you can run npx prisma generate to generate a MongoDB-compatible Prisma Client. The Prisma Client API is the same for Mongo as it is for other supported relational databases (PostgreSQL, MySQL, SQLite and Microsoft SQL Server).

To test that everything works, you can run the following script:

import { PrismaClient } from "@prisma/client"
const prisma = new PrismaClient()

async function main() { // Create the first post await prisma.post.create({ data: { title: "Prisma <3 MongoDB", slug: "prisma-loves-mongodb", body: "This is my first post. Isn't MongoDB + Prisma awesome?!", }, }) // Log our posts showing nested structures console.dir(posts, { depth: Infinity }) }

main() .catch(console.error) .finally(() => prisma.$disconnect())

You should see a new post created and added to your database! You can use Prisma Studio to view the record you just added by running npx prisma studio.

This is just the tip of the iceberg. Learn more in our Getting Started Guide.

We would love to know your feedback! If you have any comments or run into any problems we're available in this issue. You can also browse existing issues that have the MongoDB label.

Prisma native support for M1 Macs 🚀

This one's for our Mac users. Prisma now runs natively on the new M1 chips. Best of all, there's nothing to configure, it just works. Enjoy the speed bump!

Fixes and improvements

Prisma Client

Prisma Migrate

📺 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" livestream.

The stream takes place on Youtube on Thursday, July 15 at 5pm Berlin | 8am San Francisco.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)
Go to the Depfu Dashboard to see the state of your dependencies and to customize how Depfu works.

Merge request reports