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.
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 > to write into a file creates a UTF-16 LE file that can not be read by wrangler d1 migrations apply. Using this new option, this problem can be avoided:
[✘ [ERROR] near "��": syntax error at offset 0 when running wrangler d1 migrations apply with Prisma generated migration (on Windows, using PowerShell) #23702](prisma/prisma#23702)
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 about the release.
Highlights
Cloudflare D1 (Preview)
This release brings Preview support for Cloudflare 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.
Here is an example of sending a query to your D1 database using Prisma Client in your Worker:
// 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 {
</tr></table>
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps @prisma/internals from 5.8.1 to 5.12.1.
Release notes
Sourced from
@prisma/internals
's releases.... (truncated)
Commits
2c09e72
feat(migrate diff): add -o --output option (#23715)9c27962
fix(migrate): fix --from/to-local-d1 & --local-d1 on Windows (#23700)b8f741a
feat(cli): integrate D1 with "migrate diff" and "db pull" (#23662)af7b771
chore(deps): update engines to 5.12.0-21.473ed3124229e22d881cb7addf559799deba...7d1162b
chore(deps): update engines to 5.12.0-19.473ed3124229e22d881cb7addf559799deba...dfac408
chore(deps): update engines to 5.12.0-17.12fad4795eef0c21ed444646215f274961d9...b6efac2
chore(deps): update definitelytyped (#23550)85f43be
chore(deps): update engines to 5.12.0-14.ac6cd787ad122596242218dca95c086051e2...0566ebb
chore(deps): update engines to 5.12.0-13.582bc82c6e2ef356990286ce3082af371dd7...8952698
chore(deps): update engines to 5.12.0-11.e53b11a2ca09d01b9f1b5079a82ec3a38822...Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show