[erlang-questions] Mnesia Erlang OTP Application sharing Schema/tables
Fri Feb 1 11:21:23 CET 2008
On 01/02/2008, db <masterofquestions@REDACTED> wrote:
> Do I create another separate application that does mnesia schema/table
> initilization and have that mnesia initializing application start first on
> nd1 or nd2?
One option is to do this.
* Startup nd1 and nd2 by hand. i.e
erl -sname nd1@REDACTED
erl -sname nd2@REDACTED
* Create the schema and the tables required
* Shutdown the nodes
Normal running phase
* Start up the full node. Applications assume that tables have been
created. If not, they crash and burn.
I used this strategy for a long time but got tierd of the two phase
process. So I built a generic app which figures out if tables have
already been created. If not it creates the required tables (or copies
them from another node in the schema).
More information about the erlang-questions