Re:Bakeware – Compile Elixir applications into single execut...
by l72 on Thursday September 17, 2020 @02:59PM
(#24508573)
For Ecto, you can just run a function:
Since migrations are idempotent, and I always want to run up to the latest migration, I just include this in lib/myapp.ex in its start function. That way any time a new release rolls out, the first node with the new release automatically runs the migrations. (We always make sure our migrations are backwards compatible for at least X number of versions, which means never deleting tables or columns so that existing nodes don't break)
[ Parent
| on HN ]
There are no comments on this comment yet.