4 ms·
The original comment was: > The Django ORM is close to useless if your database is not generated by the web app to which I replied > not in my experience I
by andybak 3y ago
The original comment was:
> The Django ORM is close to useless if your database is not generated by the web app
to which I replied
> not in my experience
I have a legacy database derived from an outside source which is running in production and all my code interacts with it via the Django ORM.
- jgalt212 3y ago> I have a legacy database derived from an outside source which is running in production and all my code interacts with it via the Django ORM. And I'm sure the Django ORM works fine for you if you're only doing read operations and the legacy database schema never migrates.
- andybak 3y agoWe do write to the database and the schema does change. In out case we don't write to the same tables but that's only because data is overwritten nightly for the tables with an external source. Assuming a situation where that wasn't happening, writing data wouldn't be a problem. As for schema changes - you just have to decide who is in charge of the schema. In this case the authoratative source would be outside of Django so you just set those tables to managed=False - the only manual task is to update your models.py when the external schema changes.