Changeset

10004:e057e8318130

migrator: Add support for archives (fixes #651)
author Kim Alvefur <zash@zash.se>
date Sun, 05 May 2019 21:31:15 +0200
parents 10003:4d702f0c6273
children 10005:409ff72c501c
files tools/migration/prosody-migrator.lua
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tools/migration/prosody-migrator.lua	Sun May 05 21:32:34 2019 +0200
+++ b/tools/migration/prosody-migrator.lua	Sun May 05 21:31:15 2019 +0200
@@ -174,6 +174,12 @@
 					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