aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-05-05 21:31:15 +0200
committerKim Alvefur <zash@zash.se>2019-05-05 21:31:15 +0200
commit037fc25b4c87c9ee1168635335c3ac5ee3af7353 (patch)
tree65ed7187cae3c966be99b6ca63460cf68d5a2b47 /tools
parent6041d3e4e83ca60fb16fb4f61d83084a76632da9 (diff)
downloadprosody-037fc25b4c87c9ee1168635335c3ac5ee3af7353.tar.gz
prosody-037fc25b4c87c9ee1168635335c3ac5ee3af7353.zip
migrator: Add support for archives (fixes #651)
Diffstat (limited to 'tools')
-rw-r--r--tools/migration/prosody-migrator.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/migration/prosody-migrator.lua b/tools/migration/prosody-migrator.lua
index 3cc10ecf..5c4800ad 100644
--- a/tools/migration/prosody-migrator.lua
+++ b/tools/migration/prosody-migrator.lua
@@ -174,6 +174,12 @@ local migration_runner = async.runner(function (job)
local data, err = origin:get(user);
assert(not err, err);
assert(destination:set(user, data));
+ elseif typ == "archive" then
+ local iter, err = origin:find(user);
+ assert(iter, err);
+ for id, item, when, with in iter do
+ assert(destination:append(user, id, item, when, with));
+ end
else
error("Don't know how to migrate data of type '"..typ.."'.");
end