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 >
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:
npx prisma migrate diff --script --from-empty --to-schema-datamodel ./prisma/schema.prisma --output ./schema.sql
Related issues: