Log Mnesia table type on creation

This commit is contained in:
Evgeny Khramtsov 2019-09-10 21:57:51 +03:00
parent 533a4eec96
commit 56b4d3902a
1 changed files with 7 additions and 1 deletions

View File

@ -258,7 +258,13 @@ validator() ->
[unique]).
create(Name, TabDef) ->
?INFO_MSG("Creating Mnesia table '~s'", [Name]),
Type = lists:foldl(
fun({ram_copies, _}, _) -> " ram ";
({disc_copies, _}, _) -> " disc ";
({disc_only_copies, _}, _) -> " disc_only ";
(_, Acc) -> Acc
end, " ", TabDef),
?INFO_MSG("Creating Mnesia~stable '~s'", [Type, Name]),
case mnesia_op(create_table, [Name, TabDef]) of
{atomic, ok} ->
add_table_copy(Name);