diff options
author | Frank <5943122+fdie@users.noreply.github.com> | 2022-10-18 15:38:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-18 15:38:55 +0200 |
commit | 28b3134098934db456277c4be42a0075bd9d24a6 (patch) | |
tree | 56f4ae36f6b557dcb8617d050b66d04845c31114 | |
parent | Update Portuguese (Brazil) translation (thanks to Wellington Terumi Uemura) (diff) |
fix table creation on a running cluster (#3913)
-rw-r--r-- | src/ejabberd_mnesia.erl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ejabberd_mnesia.erl b/src/ejabberd_mnesia.erl index 70dfe3e6e..88762746c 100644 --- a/src/ejabberd_mnesia.erl +++ b/src/ejabberd_mnesia.erl @@ -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. |