Hacker News new | ask | show | jobs
by buro9 4938 days ago
I quite like ORMs for simple things (the first 80%), but I don't necessarily want the ORM to control schema generation and migration (I very much want integrity to be a database supported feature rather than a feature of the ORM).

As I note the author is also the submitter, a question: Is it a design goal or possibility to use the ORM but to disable schema generation/migration?

2 comments

Schema management is one of the features I really want to use in an orm as it's the main pain in the ass when it comes to dealing with relational databases.
Oh it's fine for those whose schemas fit into the type that the ORM can generate, I have no issue with the functionality existing at all. For many databases this actually is all that will ever be needed.

But for legacy databases, for the edge cases where the schema is designed for a very specific purpose that doesn't neatly fit what the ORM would generate, and especially when external applications may also call the database... I like to know that the database is exactly what I expect it to be.

I have a 2000 table, 45000 sproc legacy database on my hands. 20 mins to deploy the schema. Its what we expect but the maintenance cost is extreme, its not testable.

That's where the ORM comes in for legacy stuff. We're moving the schema slowly into the ORM.

schema creation is completely optional, you don't have to use it.