From de7a143a2c2d9e6b74e4270afda26458e72684ee Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Sat, 19 Nov 2016 13:05:13 +0300 Subject: [PATCH] Transform ejabberd_commands on the start --- src/ejabberd_commands.erl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ejabberd_commands.erl b/src/ejabberd_commands.erl index 8d74ad5a2..6172b18ed 100644 --- a/src/ejabberd_commands.erl +++ b/src/ejabberd_commands.erl @@ -277,6 +277,10 @@ get_commands_spec() -> args_example = ["/home/me/docs/api.html", "mod_admin", "java,json"], result_example = ok}]. init() -> + try mnesia:transform_table(ejabberd_commands, ignore, + record_info(fields, ejabberd_commands)) + catch exit:{aborted, {no_exists, _}} -> ok + end, mnesia:create_table(ejabberd_commands, [{ram_copies, [node()]}, {local_content, true}, -- 2.40.0