Is it possible to automatically create migrations?

If we talk about production use, I would 100% definitely wouldn’t want this feature, sometimes even the explicit migrations are not possible or very hard, but to have something that does this under the hood, even more.

I don’t think anyone is talking about automatic migrations that like… “automagically run when you deploy” or something, right? If so, that is 10000% a bad idea.

Migration generators like the one in Ash are conveniences that give you a starting point that you should then review yourself, and often will need to make edits. So you make some changes to your app, run the migration generator, and it spits out regular Ecto migrations that you can edit to your hearts content (it won’t try to change them or anything).

8 Likes