diff options
author | Kim Alvefur <zash@zash.se> | 2019-05-05 21:31:15 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-05-05 21:31:15 +0200 |
commit | 015d0616141b8ff16abf47b6e45d2c486f102e07 (patch) | |
tree | 65ed7187cae3c966be99b6ca63460cf68d5a2b47 | |
parent | 7112f319c35e19bbc75579c102f2bc37b4d911bb (diff) | |
download | prosody-015d0616141b8ff16abf47b6e45d2c486f102e07.tar.gz prosody-015d0616141b8ff16abf47b6e45d2c486f102e07.zip |
migrator: Add support for archives (fixes #651)
-rw-r--r-- | tools/migration/prosody-migrator.lua | 6 |
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 |