opentrader
opentrader copied to clipboard
Migrating Prisma to Drizzle
We should consider migrating to Drizzle ORM due to several pain points we've been encountering with Prisma:
-
Single
schema.prismafile limitation: Can't define or switch between multiple databases (e.g., SQLite and Postgres) programatically. - Custom DSL: schema.prisma is its own language, can't reuse TypeScript logic, types, etc.
- Generated @prisma/client in node_modules: Introduces complexity in monorepos, especially when bundling or running in containers
- No Termux/Android support: No binaries are provided for this OS https://github.com/prisma/prisma/issues/9968 https://github.com/prisma/prisma/issues/24848
- Monorepo friction: Requires workarounds to separate schema, client, and models across packages.
Discussion: https://github.com/drizzle-team/drizzle-orm/issues/4614
Wait until v1 released https://orm.drizzle.team/roadmap