Lesson 21

# Deploying Phoenix

3
##### lockThis is a paid lesson.
###### Buy the course Discover Elixir & Phoenix

bash&gt;&gt; heroku run mix.ecto.migrate Running mix.ecto.migrate on ⬢ marreckgyr... up, run.7275 (Free) bash: mix.ecto.migrate: command not found

First: the command should be heroku run mix ecto.migrate

Second: If you encounter this error: [error] Could not retrieve migrated versions. This error typically happens when the "schema_migrations" table, which Ecto uses for storing migrationinformation, is already used by another library or for other purposes. you need to turn off the web dyno, call ecto.migrate once again and then turn web dyno back up. The reason is, that web app uses all available connections to database and thus console command can't connect.

Wondering why simply not change all that in prod.secret.exs (change secrets to env vars) and then just add it to github (remove from .gitignore). that way we don't need to rewrite it again.

@stefanjarina: I suppose that works, although the whole point of prod.secret.exs is that it should contain your credentials in plain text (and therefore not be commited to GitHub).