Note that Application.ensure_all_started/1
will also start your application, so since it’s a Phoenix app it will start the whole server and any other child processes you have specified in your supervisor. You might not want to do that when running a migration, so you could try just Application.ensure_started/1
to selectively start only the apps you need.
7 Likes