4 ms·
Agreed, I hate the way Django does it. I don't want my database migrations to be tightly coupled to my models - what's the point? I'm not sure that the Django
by arrowsmith 3y ago
Agreed, I hate the way Django does it. I don't want my database migrations to be tightly coupled to my models - what's the point?
I'm not sure that the Django approach would make sense in Ecto anyway because Ecto schemas are explicitly _not_ "models". The function of a Django/Rails "model" is divided between different concepts like schemas, Ecto.Query, Ecto.Changeset, the Repo etc.
- freedomben 3y agoSame. I was annoyed at first with what felt like duplication (and indeed is duplication for the first time the table is created), but over time the Ecto/Elixir method really showed it's merit and is IMHO the cleary superior way for a maintainable long-term application. The magic and the convenience in the short term it brings are not worth it. The straight forward, explicit and crystal clear declarative way for migrations and the schema are IMHO a joy.