migrator: Add an escape hatch to allow arbitrary config options
authorKim Alvefur <zash@zash.se>
Mon, 27 Nov 2023 17:19:16 +0100
changeset 13352 47ede3d51833
parent 13351 5fe8a8e16b27
child 13353 d5d4e386c6fb
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" } }
tools/migration/prosody-migrator.lua
--- 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)