Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ericentin
Last active October 9, 2023 09:28
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save ericentin/90cc36d29c2a2a5d4629 to your computer and use it in GitHub Desktop.
Save ericentin/90cc36d29c2a2a5d4629 to your computer and use it in GitHub Desktop.
How to run Ecto migrations from an exrm release
./bin/turbo rpc Elixir.Ecto.Storage up "['Elixir.Turbo.Repo']."
./bin/my_app rpc Elixir.Mix.Ecto migrations_path "['Elixir.MyApp.Repo']."
# => <<"/opt/my_app/production/rel/my_app/lib/my_app-0.0.1/priv/repo/migrations">>
./bin/my_app rpc Elixir.Ecto.Migrator run "['Elixir.MyApp.Repo', <<\"/opt/my_app/production/rel/my_app/lib/my_app-0.0.1/priv/repo/migrations\">>, up, [{all, true}]]."
# => []
@gaynetdinov
Copy link

Actually getting migrations folder using Mix.Ecto didn't work for me. So I forked this gist with my approach https://gist.github.com/gaynetdinov/60673b3fed4098a2ce34ce6d670290c7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment