From 699dab7c6d9eec4565b11f76d1e27d17321176df Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 8 Apr 2017 16:33:42 +0200 Subject: migration/prosody_sql: Commit transaction when all items have been processed --- tools/migration/migrator/prosody_sql.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/migration/migrator/prosody_sql.lua b/tools/migration/migrator/prosody_sql.lua index 2dd07bdc..642b74c2 100644 --- a/tools/migration/migrator/prosody_sql.lua +++ b/tools/migration/migrator/prosody_sql.lua @@ -161,7 +161,7 @@ local function writer(output, iter) local insert_sql = "INSERT INTO `prosody` (`host`,`user`,`store`,`key`,`type`,`value`) VALUES (?,?,?,?,?,?)"; return function(item) - if not item then return end -- end of input + if not item then assert(engine.conn:commit()) return end -- end of input local host = item.host or ""; local user = item.user or ""; for store, data in pairs(item.stores) do -- cgit v1.2.3 From 54fea3aeec367884bd249ca317662eac07c66861 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 8 Apr 2017 16:42:42 +0200 Subject: prosodyctl: Point out how default_storage is redundant if storage is a string --- prosodyctl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/prosodyctl b/prosodyctl index be68f0f4..efdc214c 100755 --- a/prosodyctl +++ b/prosodyctl @@ -973,6 +973,13 @@ function commands.check(arg) print(" For more information see https://prosody.im/doc/storage"); end end + for host, config in pairs(config) do + if type(rawget(config, "storage")) == "string" and rawget(config, "default_storage") then + print(""); + print(" The 'default_storage' option is not needed if 'storage' is set to a string."); + break; + end + end local require_encryption = set.intersection(all_options, set.new({"require_encryption", "c2s_require_encryption", "s2s_require_encryption"})):empty(); local ssl = dependencies.softreq"ssl"; if not ssl then -- cgit v1.2.3