Software / code / prosody
Changeset
13348:47ede3d51833
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"
}
}
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 27 Nov 2023 17:19:16 +0100 |
| parents | 13347:5fe8a8e16b27 |
| children | 13349:d5d4e386c6fb |
| files | tools/migration/prosody-migrator.lua |
| diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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)