setup_mnesia(Name) ->
?VALUE(application:start(mnesia)),
?VALUE(mnesia:create_schema([node()|[Name]])),
?VALUE(mnesia:create_table(muppet, [
{attributes, record_info(fields, muppet)},
{disc_copies, [foo@kos13]}])),
?VALUE(mnesia:wait_for_tables([muppet], infinity)),
ok.
result is
"application : start ( mnesia )" = ok
"mnesia : create_schema ( [ node ( ) | [ Name ] ] )" = {error, {foo@kos13, {already_exists, foo@kos13}}}
"mnesia : create_table ( muppet , [ { attributes , record_info ( fields , muppet ) } , { disc_copies , [ foo@kos13 ] } ] )" = {aborted, {bad_type, muppet, disc_copies, foo@kos13}}
EDITED, ADDED if rewrite both processes to call application:start after mnesia:create_schema it spits out "Cannot install fallback". In current directory appear two files - FALLBACK.BUP and foo@kos13131851070846165246847780.