Reputation: 3301
I come from a python / django background where a simple python manage.py makemigrations
was generating my migration.
Now the question is, with Ecto, I do not find commands like that. It seems i have to use mix ecto.gen.migration
and then fill the migration manually. It will not detect changes in my model automatically, I have to fill it manually.
Do you have any ideas how to generate the migration almost automatically (for instance if I am adding a field in an existing model).
Upvotes: 7
Views: 989
Reputation: 5156
As of the latest relevant commit, June 2018, this functionality is not there.
As an idea, why not try and parse the schema
clause in the model, compare it to the underlying database and generate the statements based on the difference? Should be doable but probably not quite easy.
Upvotes: 3