Migration 使用Elixir中的exrm在服务器上运行迁移
我需要在通过exrm部署Phoenix应用程序的服务器上运行迁移。根据这一点,我为迁移创建了第一个文件并运行了它:Migration 使用Elixir中的exrm在服务器上运行迁移,migration,elixir,phoenix-framework,Migration,Elixir,Phoenix Framework,我需要在通过exrm部署Phoenix应用程序的服务器上运行迁移。根据这一点,我为迁移创建了第一个文件并运行了它: $ rel/my_app/bin/my_app test1 Elixir.Release.Tasks migrateUsing ....../rel/my_app/releases/0.0.2/my_app.sh Usage: my_app {start|start_boot <file>|foreground|stop|restart|reboot|ping|rpc
$ rel/my_app/bin/my_app test1 Elixir.Release.Tasks migrateUsing ....../rel/my_app/releases/0.0.2/my_app.sh
Usage: my_app {start|start_boot <file>|foreground|stop|restart|reboot|ping|rpc <m> <f> [<a>]|console|console_clean|console_boot <file>|attach|remote_console|upgrade|escript|command <m> <f> <args>}
$ rel/my_app/bin/my_app command release_tasks test2
Using ......./rel/my_app/releases/0.0.2/my_app.sh
{"init terminating in do_boot",{undef,[{release_tasks,test2,[],[]},{init,start_it,1,[]},{init,start_em,1,[]}]}}
Crash dump is being written to: erl_crash.dump...done
init terminating in do_boot ()
怎么了
我的文件位于
priv/tasks。exs
priv
目录不在加载路径中。将tasks.exs
移动到lib/tasks.ex
,它应该可以工作。priv
目录不在加载路径中。将tasks.exs
移动到lib/tasks.ex
,它应该可以工作。请发布您的tasks.ex文件。它与文章中的文件相同。在文章中,它们使用migrate
函数,您正在使用test2
。如果完全相同,请使用rel/my\u-app/bin/my\u-app命令发布任务迁移
。请发布您的tasks.ex文件。它与文章中的相同。在文章中,它们使用migrate
函数,您使用的是test2
。如果完全相同,请使用rel/my\u app/bin/my\u app命令release\u tasks migrate
。