2017-10-14 14 views

답변

0

distillery docs은 마이그레이션과 같은 실행 작업에 대한 지침을 제공합니다.

Amnesia mix task은 단순히 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 

그래서 당신이 당신의 자신의 모듈이를 복제 할 수 및 증류소와 함께 호출해야 custom command