migrator: Add an escape hatch to allow arbitrary config options
Previously only SQL settings and the 'path' for internal storage could
be set, and only for SQL and internal storage.
input {
type = "whatever";
config = {
whatever_foobar = "something"
}
}
--- a/tools/migration/prosody-migrator.lua Mon Nov 27 08:19:52 2023 +0100
+++ b/tools/migration/prosody-migrator.lua Mon Nov 27 17:19:16 2023 +0100
@@ -168,6 +168,11 @@
elseif conf.type == "sql" then
cm.set(host, "sql", conf);
end
+ if type(conf.config) == "table" then
+ for option, value in pairs(conf.config) do
+ cm.set(host, option, value);
+ end
+ end
end
local function get_driver(host, conf)