是否可以将失忆症与酿酒厂一起使用。因为在 distillery 版本中无法使用 mix,所以我不确定如何创建 mnesia db。
问问题
307 次
1 回答
1
distillery 文档提供了一些关于运行迁移等任务的指导。
Amnesia mix 任务似乎只是调用了您的数据库模块函数create!
:
def run(args) do
options = parse_args(args)
copying = parse_copying(options)
db = ensure_database_module(options[:database])
if options[:schema] do
Amnesia.Schema.create
end
Amnesia.start
try do
db.create!(copying)
:ok = db.wait(15000)
after
Amnesia.stop
end
end
所以你应该能够在你自己的模块中复制它,并使用 distillery自定义命令调用它
于 2017-10-21T02:39:57.643 回答