I’m learning Elixir and need some mentoring :). Here is my question :
I have a simple app that uses
Amnesia for now). When I start
mnesia I do:
:mnesia.create_schema([node()]) :mnesia.create_table(Table, [attributes: [:id, :name]]) :mnesia.start
This create a
Mnesia.nonode@nohost directory. What I wan’t is too have at least 2 kinds of databases, one for tests data (
Mix.env == :test) and one for development data (
Mix.env == :dev).
I plan to erase the test database everytime my application stop and create it everytime it starts (using the
The data directory created by
mnesia takes the name of the Erlang VM, that is why I guess I need to name my VMs according to the environment (
Is this doable ? Is this the right way ?