anchor.diff:          _ ->
               init:stop()
       end.
  -
   
   %% @doc Function migrating datas
   %%      Should be called on the leo_manager master after all partner nodes finished initialization processes
  
positive.code: -spec(create_mnesia_tables_2(master | slave, list()) ->
               ok | {error, any()}).
  create_mnesia_tables_2(Mode,_Nodes) ->
      ok = application:start(mnesia),
      Ret = case catch mnesia:system_info(tables) of
                {'EXIT', {aborted, Reason}} ->
                    ?error("create_mnesia_tables_2/2", [{cause, Reason}]),
                    {error, ?ERROR_MNESIA_GET_TABLE_INFO_ERROR};
                Tbls when length(Tbls) > 1 ->
                    case mnesia:wait_for_tables(Tbls, timer:seconds(180)) of
  
negative.code:                               ok
                            catch
                                _:Cause ->
                                    ?error("create_mnesia_tables_2/1", [{cause, Cause}]),
                                    {error, ?ERROR_MNESIA_PROC_FAILURE}
                            end;
                        {timeout, BadTabList} ->
                            Cause = ?ERROR_MNESIA_WAIT_FOR_TABLE_TIMEOUT,
                            ?error("create_mnesia_tables_2/1",
                                   [{cause, Cause},
                                    {bad_tables, BadTabList}]),
                            {error, Cause};
                        {error, Reason} ->
                            ?error("create_mnesia_tables_2/1", [{cause, Reason}]),
                            {error, ?ERROR_MNESIA_WAIT_FOR_TABLE_ERROR}
                    end;
                _Tbls ->
                    Cause = ?ERROR_TABLE_NOT_EXISTS,
                    ?error("create_mnesia_tables_2/1", [{cause, Cause}]),
                    {error, Cause}
            end,
  
  