Can't migrate because app is down, can't start app because migrations not done

It’s been… a ride getting my phoenix app deployed.

After quite some time, I’ve finally gotten deliver setup, however I can’t start the app because my migration hasn’t been run yet, but I can’t run my migration without starting the app!

Error I get when running app:

postgres =>
  #{code => undefined_table,

Error I get when running mix edeliver migrate production --verbose


production node:

  user    : ---
  host    : ---
  path    : ---
  response: Node is not running!

The table not defined error is probably blocking phoenix from starting because the schema is being referenced inside the supervisor/worker in a gen server.

have you created the db? believe it to be a manual step with edeliver…

this guide has info on how to do it if you scroll down https://medium.com/@zek/deploy-early-and-often-deploying-phoenix-with-edeliver-and-distillery-part-one-5e91cac8d4bd

there are a few more guides here A Beginner's Guide To Deployment with Edeliver and Distillery

If you’re using distillery to create the release, you can try to follow this guide to migrate your DB without starting the entire application: https://github.com/bitwalker/distillery/blob/master/docs/Running%20Migrations.md