prisma v8.0.0-rc.5

v8.0.0-rc.5Pre-release
Added 1
  • Row-spec'd raw queries expose .returns, a record of typed column refs, allowing outer raw queries to reuse inner query's declared columns
Changed 1
  • ORM command family is now keyed by unified CLI's mount paths, with commands moved from standalone spellings (format, migrate, ref, init) to unified spellings (contract format, db migrate, migration ref list|set|delete, orm init)
Fixed 6
  • aggregate() now reduces over exactly the rows a chain's take/skip/cursor/distinct/distinctOn describes instead of reducing over all matching rows
  • groupBy() now scopes pre-group pagination to the rows it groups instead of dropping it, and GroupedCollection gained take/skip/orderBy to page the groups themselves
  • Postgres runtime attaches error listeners to every pool and client to prevent dropped idle connections from crashing the process as uncaught exceptions
  • PSL language server recognizes connection errors raised by any bundled copy of vscode-jsonrpc instead of crashing on duplicated copies
  • CLI error text interpolates the configured migrations directory instead of assuming the default path
  • orm init failure messages point to existing flags (--skip-skills, --confirm) and mounted prisma orm init instead of retired flags (--no-skill, --force, prisma-cli init)

From prisma

The ORM command family now ships the unified CLI's command paths directly, the Postgres runtime survives dropped idle connections, aggregation respects the chain it terminates, and the raw lane lets an outer query reuse an inner query's typed return columns.

The upgrade recipe for this hop: the user recipe.

Breaking changes
  • The ORM command family is keyed by the unified CLI's mount paths@prisma/orm-toolchain's command family now publishes the six moved commands under their unified spellings (contract format, db migrate, migration ref list|set|delete, orm init) instead of the retired standalone grammar (format, migrate, ref …, init), and every help example and error remediation names those paths (with the {bin} placeholder instead of a hardcoded binary name). Through the unified prisma CLI nothing moves — these were already the mounted paths — but a host that mounts the family by key, or a script driving the workspace binary with the old spellings, must respell the six commands. (#30102)

    Before:

    prisma migrate --to production
    prisma ref set staging 4cb4256
    

    After:

    prisma db migrate --to production
    prisma migration ref set staging 4cb4256
    
Features
  • A row-spec'd raw query exposes .returns, a record of typed column refs, so an outer raw query can reuse an inner query's declared column (for example a CTE's aggregate) instead of restating its codec id. (#30075)
Fixes
  • aggregate() now reduces over exactly the rows a chain's take / skip / cursor / distinct / distinctOn describes, instead of silently reducing over every matching row. (#30067)
  • groupBy() now scopes pre-group pagination to the rows it groups instead of dropping it, and GroupedCollection gained take / skip / orderBy to page the groups themselves. (#30092)
  • The Postgres runtime attaches 'error' listeners to every pool and client it creates or receives, so a dropped idle connection (database restart, pooler timeout, network blip) no longer crashes the process as an uncaught exception. Pools your own code constructs and uses directly still need a listener — see the upgrade recipe. (#30081)
  • The PSL language server recognizes connection errors raised by any bundled copy of vscode-jsonrpc, instead of crashing when a duplicated copy raised them. (#30077)
  • CLI error text interpolates the configured migrations directory instead of assuming the default path. (#30041)
  • orm init's failure messages no longer name retired flags or binaries (--no-skill, --force, prisma-cli init); they point at the flags that exist (--skip-skills, --confirm <directory name>) and the mounted prisma orm init. (#30083)
View original

Upgraded? How did it go?

Discussion