Today, we are excited to share the 2.25.0
stable release 🎉
🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟
Major improvements & new features
Human-readable drift diagnostics for prisma migrate dev
Database schema drift occurs when your database schema is out of sync with your migration history, i.e. the database schema has drifted away from the source of truth.
With this release, we improve the way how the drift is printed to the console when detected in the prisma migrate dev
command. While this is the only command that uses this notation in today's release, we plan to use it in other places where it would be useful for debugging in the future.
Here is an example of how the drift is presented with the new format:
[*] Changed the `Color` enum
[+] Added variant `TRANSPARENT`
[-] Removed variant `RED`
[*] Changed the `Cat` table
[-] Removed column `color`
[+] Added column `vaccinated`
[*] Changed the `Dog` table
[-] Dropped the primary key on columns (id)
[-] Removed column `name`
[+] Added column `weight`
[*] Altered column `isGoodDog` (arity changed from Nullable to Required, default changed from `None` to `Some(Value(Boolean(true)))`)
[+] Added unique index on columns (weight)
Support for .env
files in Prisma Client Go
You can now use a .env
file with Prisma Client Go. This makes it easier to keep database credentials outside your Prisma schema and potentially work with multiple clients at the same time:
example/
├── .env
├── main.go
└── schema.prisma
Learn more about using the .env
file in our documentation.
Breaking change
Dropping support for Node.js v10
Node.js v10 reached End of Life on April 30th 2021. Many of our dependencies have already dropped support for Node.js v10 so staying up-to-date requires us to drop Node.js v10, too.
We recommend upgrading to Node.js v14 or greater for long-term support. You can learn more about Node.js releases on this page.
Fixes and improvements
Prisma Client
- [Errors] New common error from malformed connection string
- prisma client doesn't work with serverless-next.js
- Failed to run future: no available capacity / QueueFull
- Clean up middleware implementation
- Possible Node API performance regression with concurrency
- Dropping Node v10 support (LTS reached EndOfLife)
- Performance regression with napi for high concurrency
- In 2.24.0
createMany
errors with:PANIC in query-engine/connectors/sql-query-connector/src/database/operations/write.rs:95:60called
Result::unwrap()on an
Errvalue: ScalarFieldNotFound { name: "updated_at", model: "FundMangerTeamMemberExperience" }
- test: snapshot
params
in Middleware tests - Running
prisma generate
doesn't install prisma client 2.24.x - Middleware + $transactions do not play well together
- Environment variable not found
Prisma Migrate
- Feature request - Migrate: When Drift Detected -> give more Details than just the rollback script
- Error: [introspection-engine\connectors\sql-introspection-connector\src\introspection_helpers.rs:188:64] called
Option::unwrap()
on aNone
value - Generate log file with Drift detected info for troubleshooting purpose
db push
/migrate
is hiding the binary download process duringgenerate
, leading to confusion- Shadow vs. main database check does not consider the port
- Re-Introspection removes
shadowDatabaseUrl
from schema
Prisma Studio
- Prisma Studio not working with napi preview feature
- Crash in simple datasource only schema
- Prisma studio requires having prisma client installed when it shouldn't
Credits
Huge thanks to @82600417, @SuryaElavazhagan, @psavan1655 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, June 17 at 5pm Berlin | 8am San Francisco.
🌎 Prisma Day is coming
Save the date for Prisma Day 2021 and join us for two days of talks and workshops by the most exciting members of the Prisma community.
- June 29th: Workshops
- June 30th: Talks
We look forward to seeing you there!