stackpicks.dev
All migration guides
Migration guide

Migrate from PrismaDrizzle

Medium1-2 days for a mid-size app6 steps
Why migrate

Drizzle has zero runtime overhead, works in edge environments (Cloudflare Workers, Vercel Edge), has SQL-first syntax. Better for serverless/edge apps.

Step-by-step

  1. 1

    1. Install Drizzle

    `pnpm add drizzle-orm drizzle-kit` plus your DB driver (`postgres`, `mysql2`, `better-sqlite3`).

  2. 2

    2. Generate Drizzle schema from existing DB

    `drizzle-kit introspect` reads your existing Postgres/MySQL schema and generates Drizzle TS schema definitions.

  3. 3

    3. Replace Prisma client usage

    Swap `prisma.user.findMany()` for `db.select().from(users)`. SQL-style, less magic.

  4. 4

    4. Migrate relations syntax

    Prisma uses `include`; Drizzle uses explicit joins or `with` syntax. Rewrite query by query.

  5. 5

    5. Set up Drizzle migrations

    Use `drizzle-kit generate` for migration files. Different style than Prisma migrate — explicit SQL.

  6. 6

    6. Remove Prisma + delete prisma/ folder

    After all queries are migrated and tests pass, remove `@prisma/client` and the `prisma/` folder.

Gotchas to watch

  • Prisma's `select` and `include` are convenient. Drizzle requires more explicit column lists.
  • Drizzle doesn't have a Prisma-style "studio" — use Drizzle Studio (separate package) or a third-party GUI.
  • TypeScript inference is great in both but works differently. Read Drizzle docs on type generation.

More open-source picks

Lifetime gets you the full curated directory with 100+ open-source tools and deep curator takes. ₹99 once.

See pricing

More migration guides

Migrate from Prisma to Drizzle — Step-by-Step Guide (2026) — StackPicks — StackPicks