25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-12 15:57:31 +01:00

fix table creation on a running cluster

This commit is contained in:
fdie 2022-10-03 18:18:20 +02:00
parent c99ff6059f
commit b636087aa4

View File

@ -172,7 +172,10 @@ change_table_copy_type(Name, TabDef) ->
if NewType /= CurrType ->
?INFO_MSG("Changing Mnesia table '~ts' from ~ts to ~ts",
[Name, CurrType, NewType]),
mnesia_op(change_table_copy_type, [Name, node(), NewType]);
if CurrType == unknown -> mnesia_op(add_table_copy, [Name, node(), NewType]);
true ->
mnesia_op(change_table_copy_type, [Name, node(), NewType])
end;
true ->
{atomic, ok}
end.