🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟
Major improvements
Improvements to Prisma Client for Data Proxy
In this release, we're shipping a couple of improvements to Prisma Client for Data Proxy.
The Prisma Data Proxy provides connection management and pooling for database connections for efficiently scaling database connections in serverless environments. The Prisma Client for Data Proxy provides support for connecting to the Prisma Data Proxy using HTTP.
We introduced this feature in version 3.3.0
and constantly shipped features, fixes, and improvements.
One of the changes in this release is improving the Prisma Client for the Data Proxy generation step.
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
- previewFeatures = ["dataProxy"]
}
You can generate Prisma Client for the Data Proxy it by using the --data-proxy
flag:
npx prisma generate --data-proxy
We also updated how you can run Prisma Client using the Data Proxy in Cloudflare Workers and Edge environments. You can now use @prisma/client/edge
instead of @prisma/client
in your application.
import { PrismaClient } from '@prisma/client/edge'
To learn more, check out our documentation.
Prisma Client Metrics is now in Preview
Metrics is a new Preview feature that allows you to monitor how Prisma Client interacts with your database. Metrics expose a set of counters, gauges, and histograms that can be labeled and piped into an external monitoring system like Prometheus or StatsD.
You can use metrics in your project to help diagnose how your application's number of idle and active connections changes with counters, gauges, and histograms.
To get started using metrics in your project, enable the Preview feature flag in your Prisma schema:
generator client {
provider = "prisma-client-js"
previewFeatures = ["metrics"]
}
You can then get started using metrics in your project:
import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()
const metrics = await prisma.$metrics.json()
console.log(metrics)
To learn more, check out the metrics documentation. Give it a try and let us know what you think.
Regression
Azure SQL on MacOS
This release includes a known regression when connecting to Azure SQL from MacOS only and will be resolved soon. Follow this issue for updates and resolution.
Fixes and improvements
migrate reset
returns with a non-0 exit code if the seed script returns with a non-0 exit code
This will help user scripts know more about the success of the command, but might break existing scripts.
Prisma
- Schema validation does not accept absolute Windows style paths for SQLite database
introspect --url
throws error if existing schema file only containsgenerator
prisma migrate reset
always exits with0
, needs to exit with1
on errors- Error: Error in migration engine. Reason: [migration-engine/connectors/sql-migration-connector/src/sql_schema_differ/differ_database.rs:111:9] no entry found for key
- Error: Error in migration engine. Reason: [migration-engine/connectors/sql-migration-connector/src/sql_schema_differ/differ_database.rs:111:9] no entry found for key
- Error: Error in migration engine. Reason: [migration-engine/connectors/sql-migration-connector/src/sql_schema_differ/differ_database.rs:111:9] no entry found for key
Would you like to create a Github issue? » Yes
does nothing in terminal on Windows- Error: [/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/str/mod.rs:580:13] byte index 59 is not a char boundary; it is inside '....' (bytes 57..60) of
患者ID
- Schema Parsing/Validation error should include CLI version
- Prisma panic on invalid int
- Error: [/rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/str/mod.rs:584:13] byte index 47 is not a char boundary; it is inside '点' (bytes 46..49) of
AirbyteRawYuriPagesAirbyteDataProperties推荐点RichText
- Introspection: Make SQL in tests more advanced so that Introspection results will include native types, not just scalar types
- Add more integration tests for CockroachDB for
db
andmigrate
commands - MongoDB - prisma db pull
- Multi-byte character truncation bug in mongo introspection connector
- MSSQL Docker Run Migration "The Trust Settings Record was corrupted"
- Running DB Pull on Remote MSSQL database
- Error: Error in migration engine. Reason: [libs/sql-schema-describer/src/postgres.rs:1039:28] no entry found for key
- Error: [libs\sql-schema-describer\src\postgres.rs:1039:28] no entry found for key
- prisma migrate deploy error
Prisma Client
- Support Bytes on SQLite
- PANIC: called
Option::unwrap()
on aNone
value in query-engine/core/src/query_document/parser.rs:250:87 - Huge Int value in
upsert
causes: "PANIC: calledOption::unwrap()
on aNone
value in query-engine/core/src/query_document/parser.rs:250:87" - Data Proxy Client should't need to be re-generated after modifying
.env
files - Data Proxy Client stopped working in Vercel Edge Functions / Next 12.0.4
- PANIC: called
Option::unwrap()
on aNone
value in query-engine\core\src\query_document\parser.rs:250:87 - Data Proxy:
prisma generate
errors withError: Error: ENOENT: no such file or directory, open '/[...]/prisma/schema.prisma'
when using a custom name for the Prisma schema file - PANIC: called
Option::unwrap()
on aNone
value in query-engine/core/src/query_document/parser.rs:250:87 - DATABASE_URL is baked in Dataproxy client proxy.js
- PANIC: called
Option::unwrap()
on aNone
value in query-engine/core/src/query_document/parser.rs:250:87 - Can't save string to Decimals list
- Sveltekit + Cloudflare adapter - "PrismaClient is unable to be run in the browser."
TypeError: at normalizeAndValidateHeaderValue
with data proxy in cloudflare workers/miniflare- PANIC: called
Option::unwrap()
on aNone
value in query-engine/core/src/query_document/parser.rs:250:87 - Implement "CLI engine crash reporting" for Formatter Engine and
getConfig
andgetDmmf
of Query Engine - Add test for internal engine port
- PANIC: called
Option::unwrap()
on aNone
value in query-engine/core/src/query_document/parser.rs:250:87 - DataProxy Client only works if I instantiate a normal Client first
- PANIC: called
Option::unwrap()
on aNone
value in query-engine/core/src/query_document/parser.rs:250:87 - Engine hard crashes on id values exceeding the Number.MAX_SAFE_INTEGER
- dbgenerated function cause Null constraint error in MySQL
- Expose Metrics in Prisma Client
- Improve the DX for enabling the data proxy
- Client crash on out-of-range integer update using Postgres
- Prisma Client has stopped working on Vercel Edge Functions
- PANIC: called
Option::unwrap()
on aNone
value in query-engine/core/src/query_document/parser.rs:250:87 InvalidDatasourceError
of Data Proxy Client outputs a code snippet- A few small typos in the repo (unkown)
- Cloudflare Workers with PlanetScale db
Credits
Huge thanks to @shian15810, @zifeo, @ever0de, @rushabhhere for helping!
Prisma Day
Prisma Day is back this year, and it'll be on June 15 - 16 at the James June Sommergarten in Berlin. Join us in-person or online for talks and workshops on modern application development and databases. Come and meet and chat with the team behind the Prisma ORM and Prisma Data Platform.
💼 We're hiring!
If you're interested in joining our growing team to help empower developers to build data-intensive applications, Prisma is the place for you.
We're looking for a Technical Support Engineer and Back-end Engineer: Prisma Data Platform.
Feel free to read through the job descriptions and apply using the links provided.
📺 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, June 9 at 5 pm Berlin | 8 am San Francisco.