Hacker News new | ask | show | jobs
by ac130kz 1655 days ago
Nah, Django makes you sad: async support is not full, migrations engine is pretty poor, not all database features are present, any kind of typing is hacky, very slow and so on
2 comments

> migrations engine is pretty poor

I find this to be an odd take. The Django migrations engine is probably its strongest feature.

Any change you make has to be atomic, or it is unable to detect the change, and you have to rely on manual migrations.
What do you mean by this? Auto migrations detect changes in your models. I'm not sure what atomic means in this context.
Let's say you change some attribute and the name of a model, Django simply does not recognize it, nuking the whole attribute
There is at least one way that migrating a + b is different than migrate a + migrate b, in ways that you can then only incrementally migrate your project rather than building from scratch.

It’s mainly in post migrate actions, and specifically for me adding a group for permissions.

If you write manual migrations, then it's often worth it to write the reverse function (in your case, deleting that group) so that you avoid this situation.
It’s not the back and forth, it’s that a migration in b that requires the post migrate step from a will fail if both migrations are run in one shot, (say, because you’re bootstrapping a new dev or test db) but it will work when done incrementally (such as during development or deployment).
What other migration engine have you used that's better? Anything non-django I've used makes me wish I was using Django
"alembic" is better by leaps and bounds. it is used within a SQLAlchemy system, which is also a superior ORM than Django's.
question of taste...
Less taste and more that data mapper ORMs are better (although harder to make) than active record ones, except for very small datasets/simple queries.
"Better" for whom? It was a long time ago that I surveyed the ORM landscape but I remember thinking at the time I was much happier using an active record style ORM.

I guess I'm saying I'm always suspicious when I see "better" with no qualification. Everything has tradeoffs.

I, for one, find data mapper simply baffling. I look at it and can't even comprehend why someone might want to do things that way.

Granted, I'm not fond of ORMs in general, but I at least understand the appeal of the active record pattern.