Today, we are excited to share the 2.22.0
stable release 🎉
🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟
Major improvements & new features
prisma db push
is now Generally Available
prisma db push
enables you to update the database schema from the Prisma schema file, without generating any migrations.
This is especially useful when prototyping a new feature, iterating on the schema changes before creating migrations or generally if you are at stage of your development process, where you don't need to persist the schema change history via database migrations.
It is now promoted from Preview to General Availabilty.
You can find more info on prisma db push
in the official docs.
Deprecation of array notation for provider
fields
In this release, we are also entirely removing the array notation for the provider
fields on datasource
blocks. This has been deprecated since 2.11.0 (November 2020).
You can read more about our reasons for this deprecation here.
Prisma Client Go gets support for AND
operator
We've always had OR
, but this release we also added AND
support:
first, err := client.User.FindFirst(
User.Or(
User.Email.Equals("john@example.com"),
User.And(
User.Name.Equals("John"),
User.Username.Equals("johno"),
),
),
).Exec(ctx)
Learn more in our docs.
Fixes and improvements
Prisma Migrate
- [Introspection] Catch ripple effects of guardrails
- Treat missing
provider
as known error that does not trigger Error Reporting - List of integers in SQLite introspected as a list even though SQLite doesn't natively support lists
- Formatting adds optional relation incorrectly
- PANIC in query-engine/connectors/sql-query-connector/src/query_builder/write.rs:22:56called
Option::unwrap()
on aNone
value - Improve readability of errors in
prisma migrate deploy
- Introspection creates invalid schema: "Error parsing attribute "@default": The
autoincrement()
default value is used on a non-indexed field even though the datasource does not support this." - Error: [libs/sql-schema-describer/src/sqlite.rs:452:76] get name
- Soft reset crash with custom user types on SQL Server
migrate dev
with shadow database errors with "Database already exists FK__Address__userId" when migration fails because of existing foreign key
Prisma Client
- Test support for PlanetScale/Vitess
- SQLServer decimal(26,0) causes PANIC in /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tiberius-0.5.9/src/tds/numeric.rs:288:47
- Cannot read property 'collectErrors' of null
- Prisma client runtime causes "Critical dependency" warning in Webpack
- Prisma is not compatible with Next.js webpack5 opt-in
- No results when using cursor and orderBy (Text type)
- Decimal value stored in MySql DB with floating point error
- napi engine cause OOMKilled in container environment
- Netlify Functions deploy fails with Prisma because of size problems, Prisma deploys with 2 QE binaries
- Misleading validation error on MongoDB connection strings
- Integrate feature flag changes in Prisma Client
- MaxListenersExceededWarning: prisma 2.20.x and above
- Prisma Client crashes with Node.js 16.0.0
Prisma Studio
Prisma engines
Credits
Huge thanks to @Sytten, @schiller-manuel, @mongolyy, @paularah, @Iamshankhadeep, @meeq 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, May 06 at 5pm Berlin | 8am San Francisco.