v8.0.0-rc.5
Breaking Changes📦 prismaView on GitHub →
⚠ 1 breaking✨ 1 features🐛 6 fixes🔧 12 symbols
Summary
This release rekeys the ORM command family by unified CLI mount paths and improves the robustness of the Postgres runtime against dropped connections. It also enhances raw query capabilities and fixes several issues with aggregation, pagination, and CLI error reporting.
⚠️ Breaking Changes
- The ORM command family is now keyed by the unified CLI's mount paths. Commands like `prisma format`, `prisma migrate`, `prisma ref ...`, and `prisma init` have been renamed to `prisma contract format`, `prisma db migrate`, `prisma migration ref ...`, and `prisma orm init` respectively. Scripts that use the old command spellings or mount the ORM command family by key will need to be updated to use the new command paths.
Migration Steps
- Update scripts that use the ORM command family to use the new command paths: `prisma db migrate` instead of `prisma migrate`, `prisma migration ref ...` instead of `prisma ref ...`, and `prisma orm init` instead of `prisma init`.
- If you construct and use Prisma pools directly in your code, ensure you attach `'error'` listeners to them.
✨ New Features
- A row-spec'd raw query now exposes `.returns`, a record of typed column references, allowing outer raw queries to reuse an inner query's declared columns (e.g., a CTE's aggregate) without restating its codec id.
🐛 Bug Fixes
- `aggregate()` now correctly reduces over the rows specified by `take`, `skip`, `cursor`, `distinct`, and `distinctOn` clauses, rather than processing all matching rows.
- `groupBy()` now correctly scopes pre-group pagination to the rows being grouped and `GroupedCollection` has gained `take`, `skip`, and `orderBy` for paginating the groups themselves.
- The Postgres runtime now attaches `'error'` listeners to all created or received pools and clients, preventing process crashes due to dropped idle connections (e.g., from database restarts, pooler timeouts, or network issues). Note: Pools constructed and used directly by user code still require manual listener attachment.
- The PSL language server now correctly recognizes connection errors from bundled copies of `vscode-jsonrpc`, avoiding crashes caused by duplicated copies.
- CLI error messages now correctly interpolate the configured migrations directory instead of defaulting to a path.
- `orm init` failure messages have been updated to reference existing flags (`--skip-skills`, `--confirm <directory name>`) and the mounted `prisma orm init` command, removing references to retired flags or binaries.