Automatically generate Drizzle ORM schema files from an existing Prisma schema. Current stable version is 0.1.7. This tool bridges Prisma and Drizzle ORM ecosystems, allowing developers to use Prisma's schema design capabilities while leveraging Drizzle's lightweight, type-safe query builder. Unlike alternative approaches that require manual schema rewriting, this generator produces a fully typed Drizzle schema that mirrors the Prisma model definitions. Supports PostgreSQL, MySQL, and SQLite data providers; binary types are not yet supported. Output can be a single TypeScript file or a folder. Works with both ESM and CJS projects. Released by the Drizzle team with active maintenance.
npm install drizzle-prisma-generatorNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Install the generator, configure in Prisma schema, generate the Drizzle schema, then use it with Drizzle ORM and a driver.
Remove or replace binary type fields from your Prisma schema before generation.
Switch to a supported provider or do not use this generator.
Ensure output ends with '.ts' to generate a single file at that exact path.
Use Prisma v4 until the generator is updated to support v5.
Ensure 'drizzle-prisma-generator' is installed (pnpm add -D drizzle-prisma-generator) and provider is exactly "drizzle-prisma-generator".
Change your datasource provider in schema.prisma to 'postgresql', 'mysql', or 'sqlite'.
Remove binary type fields or convert them to supported types (e.g., String).