←back to thread

60 points Bogdanp | 1 comments | | HN request time: 0.202s | source
Show context
cogman10 ◴[] No.44608805[source]
This sort of thing hasn't really done much to make me like ORMs.

It seems like a lot of code to generate the tables in the first place and you STILL need to read the output scripts just to ensure the ORM isn't generating some garbage you didn't want.

That seems like a lot of extra effort when a simple migration service (such as liquibase) could do the same work running SQL directly. No question on "which indexes are getting created and why". No deep knowledge of Django interactions with sql. Instead, it's just directly running the SQL you want to run.

replies(2): >>44608878 #>>44609291 #
teaearlgraycold ◴[] No.44608878[source]
I would say automatic migration generation isn’t a necessary or particularly important part of an ORM. ORMs are there to map your database relational objects to your client language’s objects.
replies(3): >>44609025 #>>44609034 #>>44609225 #
1. Tostino ◴[] No.44609034[source]
I'd call it an anti-feature for most long-lived projects that will end up needing migrations through its lifetime.

I go the liquibase route for migrations, and just use the mapping portion of any ORM.