A Prisma generator that creates a Drizzle ORM schema from your Prisma schema, enabling migration from Prisma to Drizzle or using both together. Version 0.7.6 targets Node >=14.0 and generates tables, enums, constraints, and relational query support. It aims for 1:1 compatibility with Prisma's field mapping, ignoring @db.* modifiers. The generator is experimental but production-safe, with ongoing development toward v1. Differentiators include support for Drizzle-specific features like $type<> and custom default functions, as well as integration with drizzle-kit.
npm install prisma-generator-drizzleNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows setup: install generator and drizzle-orm, configure Prisma schema, generate, then use the generated schema with drizzle-orm and relational query.
Manually adjust the generated Drizzle schema or use only default scalar types
Update Node.js to version 14 or higher
Do not use dateMode with SQLite databases
Manually specify moduleResolution in the generator config or ensure tsconfig doesn't use extends
Set relationalQuery = false in the generator configuration if you do not want relational query support
Run 'npm install drizzle-orm'
Add 'generator drizzle { provider = "prisma-generator-drizzle" }' to your Prisma schemaUse only default Prisma scalar types (String, Int, Float, Boolean, DateTime, Json, Bytes) or resolve manually
Use ESM imports (import ... from) or configure a bundler/transpiler like TypeScript with esModuleInterop