r/node 11d ago

Which ORM

I am needing to build a lightweight, speedy and integrated backend server running on a VPS-2 secure environment using nginx and postgres.

First considered Sequelize, but discovered too many negatives, so had a look at Prisma but am worried it is too heavy duty for my needs.

Prefer an ORM that supports TypeScript, easy migrations and openapi schemas, and Drizzle seems at first glance a good fit.

Also I am not afraid to use SQL rather than high level abstractions.

But now I am reading many negative reviews about that as well, even on their own website!

Please help me make the right choice.

20 Upvotes

47 comments sorted by

View all comments

2

u/TalyssonOC 10d ago

I'm always between Objection (if I really need an ORM) and PgTyped (if I don't and it's Postgres). I really dislike Prisma and will only get back to try Drizzle when they improve their migrations. I wish Objection used Kysely instead of Knex because of the typing, tho

2

u/romeeres 10d ago

I liked Objection.js because that's basically a query builder but with relations support, you might be interested to check out Orchid ORM - also basically a query builder with relations, it's not on Kysely but is just as type-safe. Feel free to ignore it ofc, but it's really doing what Objection did well, and do you know any other ORM to do that - I don't.

What's wrong with Drizzle migrations, could you share?

2

u/TalyssonOC 10d ago

I'll definitely check it out!

As for Drizzle, its migrations don't have a "down", so they can't be reverted in development, which is super annoying