mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
fix table creation on a running cluster (#3913)
This commit is contained in:
parent
d2f79e268e
commit
28b3134098
@ -172,7 +172,10 @@ change_table_copy_type(Name, TabDef) ->
|
|||||||
if NewType /= CurrType ->
|
if NewType /= CurrType ->
|
||||||
?INFO_MSG("Changing Mnesia table '~ts' from ~ts to ~ts",
|
?INFO_MSG("Changing Mnesia table '~ts' from ~ts to ~ts",
|
||||||
[Name, CurrType, NewType]),
|
[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 ->
|
true ->
|
||||||
{atomic, ok}
|
{atomic, ok}
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user