26
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

No need to explicitly skip old useless tables, simply fix keep_tables

This commit is contained in:
Badlop 2011-09-14 12:15:53 +02:00
parent 228a587fc5
commit 07fdd089a0

View File

@ -427,18 +427,14 @@ restore_mnesia(Path) ->
%% mod_configure/adhoc %% mod_configure/adhoc
restore(Path) -> restore(Path) ->
mnesia:restore(Path, [{keep_tables,keep_tables()}, mnesia:restore(Path, [{keep_tables,keep_tables()},
{skip_tables, skip_tables()},
{default_op, skip_tables}]). {default_op, skip_tables}]).
skip_tables() ->
[disco_publish,user_caps,user_caps_resources].
%% This function return a list of tables that should be kept from a previous %% This function return a list of tables that should be kept from a previous
%% version backup. %% version backup.
%% Obsolete tables or tables created by module who are no longer used are not %% Obsolete tables or tables created by module who are no longer used are not
%% restored and are ignored. %% restored and are ignored.
keep_tables() -> keep_tables() ->
lists:flatten([acl, passwd, config, local_config, disco_publish, lists:flatten([acl, passwd, config, local_config,
keep_modules_tables()]). keep_modules_tables()]).
%% Returns the list of modules tables in use, according to the list of actually %% Returns the list of modules tables in use, according to the list of actually