Skip to content

v0.6.3

Choose a tag to compare

@github-actions github-actions released this 04 Dec 10:53
e46b5bd

Prisma 5 and 6 support. No breaking changes.

Features

  • @clientdb/prisma works with Prisma 5, 6 and 7, with no workaround.
    • The generator speaks Prisma's generator protocol itself, and the package depends on none of Prisma's packages. prisma is an optional peer (5 or later), so a Prisma 5 app gets nothing of Prisma 7 installed.
    • Prisma 5's DMMF is converted in its own module: @db.* native types are read from the schema source (every file of a multi-file schema), and uuid(4)-style default names read as uuid().
    • Without the generator, datamodelSubset(dmmf, { schema }) takes the schema source for a Prisma 5 DMMF.
  • The generator stops with a clear error for a datasource that isn't PostgreSQL and for Prisma older than 5.

Fixes

  • npx clientdb setup and migrate read .env.local and .env from the working directory, as the Prisma CLI does. Variables already set win.

Published to npm