the-coder-o / a-bd.me

My personal website made with Next.js 14 (App Router). Features blog posts, gear list, dark theme and more. Tailwind CSS, Radix, Framer Motion, and Vercel.
https://www.a-bd.me
MIT License
8 stars 0 forks source link

Update prisma monorepo to v5.12.0 #81

Closed renovate[bot] closed 7 months ago

renovate[bot] commented 7 months ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@prisma/client (source) 5.11.0 -> 5.12.0 age adoption passing confidence
prisma (source) 5.11.0 -> 5.12.0 age adoption passing confidence

Release Notes

prisma/prisma (@​prisma/client) ### [`v5.12.0`](https://togithub.com/prisma/prisma/releases/tag/5.12.0) [Compare Source](https://togithub.com/prisma/prisma/compare/5.11.0...5.12.0) Today, we are excited to share the `5.12.0` stable release 🎉 🌟 **Help us spread the word about Prisma by starring the repo or [posting on X](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@​prisma%20release%20v5.12.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/5.12.0) about the release.** #### Highlights ##### Cloudflare D1 (Preview) This release brings Preview support for [Cloudflare D1](https://developers.cloudflare.com/d1/) with Prisma ORM 🥳 D1 is Cloudflare’s SQLite database that can be used when deploying applications with Cloudflare. When using Prisma ORM with D1, you can continue to: model your database with Prisma schema language, specify `sqlite` as your database provider in your Prisma schema, and interact with your database using Prisma Client. To use Prisma ORM and D1 on Cloudflare Workers or Cloudflare Pages, you need to set `sqlite` as your database provider and use the `@prisma/adapter-d1` database adapter via the `driverAdapters` Preview feature, released back in version [5.4.0](https://togithub.com/prisma/prisma/releases/tag/5.4.0). Here is an example of sending a query to your D1 database using Prisma Client in your Worker: ```ts // src/index.ts file import { PrismaClient } from '@​prisma/client' import { PrismaD1 } from '@​prisma/adapter-d1' // Add the D1Database to the Env interface export interface Env { // This must match the binding name defined in your wrangler.toml configuration DB: D1Database } export default { async fetch( request: Request, env: Env, ctx: ExecutionContext ): Promise { // Make sure the database name matches the binding name in wrangler.toml and Env interface const adapter = new PrismaD1(env.DB) // Instantiate PrismaClient using the PrismaD1 driver adapter const prisma = new PrismaClient({ adapter }) const users = await prisma.user.findMany() const result = JSON.stringify(users) return new Response(result) }, } ``` 📚 **Documentation:** [Deploying a Cloudflare worker with D1 and Prisma ORM](https://prisma.io/docs/orm/overview/databases/cloudflare-d1#how-to-connect-to-d1-in-cloudflare-workers-or-cloudflare-pages) ✍️ **Blog post:** [Build Applications at the Edge with Prisma ORM & Cloudflare D1 (Preview)](https://www.prisma.io/blog/build-applications-at-the-edge-with-prisma-orm-and-cloudflare-d1-preview) 📣 **Share your feedback:** [D1 Driver Adapter](https://togithub.com/prisma/prisma/discussions/23646) 🚀 **Example project:** [Deploy a Cloudflare Worker with D1](https://togithub.com/prisma/prisma-examples/tree/latest/deployment-platforms/edge/cloudflare-workers/with-d1) ##### `createMany()` for SQLite Bringing support for `createMany()` in SQLite has been a [long-awaited and highly requested feature](https://togithub.com/prisma/prisma/issues/10710) ⭐ `createMany()` is a method on Prisma Client, released back in version [2.16.0](https://togithub.com/prisma/prisma/releases/tag/2.16.0), that lets you insert multiple records into your database at once. This can be really useful when seeding your database or inserting bulk data. Here is an example of using `createMany()` to create new users: ```ts const users = await prisma.user.createMany({ data: [ { name: 'Sonali', email: 'sonali@prisma.io' }, { name: 'Alex', email: 'alex@prisma.io' }, { name: 'Yewande', email: 'yewande@prisma.io' }, { name: 'Angelina', email: 'angelina@prisma.io' }, ], }) ``` Before this release, if you wanted to perform bulk inserts with SQLite, you would have most likely used `$queryRawUnsafe` to execute raw SQL queries. But now you don’t have to go through all that trouble 🙂 With SQLite, `createMany()` works exactly the same way from an API standpoint as it does with other databases except it does not support the `skipDuplicates` option. At the behavior level, SQLite will split `createMany()` entries into multiple `INSERT` queries when the model in your schema contains fields with attributes like `@default(dbgenerated())` or `@default(autoincrement())` and when the fields are not consistently provided with values across the entries. 📚**Documentation:** [`createMany()` - Prisma Client API Reference](https://www.prisma.io/docs/orm/reference/prisma-client-reference#createmany) #### Fixes and Improvements ##### Prisma Client - [N+1 Issue with `Decimal` data type and combining queries (batching)](https://togithub.com/prisma/prisma/issues/5952) - [Batched `findUnique()` error out when the field is of `Boolean` type](https://togithub.com/prisma/prisma/issues/22384) - [`relationJoins` MySQL converts nested Decimal to float](https://togithub.com/prisma/prisma/issues/23233) - [Unexpected query leading to querying full table when using batched `findUnique()`](https://togithub.com/prisma/prisma/issues/23343) - [`node-postgres` (pg) errors with misleading `P2010 PrismaClientKnownRequestError` when using `@prisma/adapter-pg` with SSL (`?sslmode=require`)](https://togithub.com/prisma/prisma/issues/23390) - [D1 DateTime type does not work](https://togithub.com/prisma/prisma/issues/23479) #### Credits Huge thanks to [@​yubrot](https://togithub.com/yubrot), [@​skyzh](https://togithub.com/skyzh), [@​anuraaga](https://togithub.com/anuraaga), [@​onichandame](https://togithub.com/onichandame), [@​LucianBuzzo](https://togithub.com/LucianBuzzo), [@​RobertCraigie](https://togithub.com/RobertCraigie), [@​arthurfiorette](https://togithub.com/arthurfiorette), [@​elithrar](https://togithub.com/elithrar) for helping!

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 these updates again.



This PR has been generated by Mend Renovate. View repository job log here.

vercel[bot] commented 7 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blog-portfolio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 2, 2024 3:14pm