When to create mnesia schema for OTP applications
Sat Jun 27 18:10:40 CEST 2009
I have a question about how folks bootstrap an OTP application that
depends on mnesia. Consider an OTP application foo that uses mnesia.
Since mnesia is specified in the needed applications list, mnesia must
be started before you start foo.
For the first run of foo, one needs to call mnesia:create_schema/1
_before_ mnesia is started.
I'd like to be able to start foo on a clean system and have the schema
created if needed, but don't see a way to handle this. I suspect that
I need to adjust my expectations :-)
Is there a recommended way to handle mnesia initialization? Is the
standard practice to create the schema outside of the application
start up flow or am I missing a way to handle this as part of foo's
More information about the erlang-questions