diff options
author | Kim Alvefur <zash@zash.se> | 2023-11-27 17:19:16 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-11-27 17:19:16 +0100 |
commit | 2f2551e6d2b679c3084450cd1711ee626e8d6e2a (patch) | |
tree | c387aee6971e62ecb00379022ab3909675cf2011 /tools | |
parent | 8a2e65d5b79217cc0d4e453fe675ecd65d97928c (diff) | |
download | prosody-2f2551e6d2b679c3084450cd1711ee626e8d6e2a.tar.gz prosody-2f2551e6d2b679c3084450cd1711ee626e8d6e2a.zip |
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"
}
}
Diffstat (limited to 'tools')
-rw-r--r-- | tools/migration/prosody-migrator.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/migration/prosody-migrator.lua b/tools/migration/prosody-migrator.lua index 51e2d835..467ecf32 100644 --- a/tools/migration/prosody-migrator.lua +++ b/tools/migration/prosody-migrator.lua @@ -168,6 +168,11 @@ local function prepare_config(host, conf) 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) |