aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-04-09 01:25:58 +0200
committerKim Alvefur <zash@zash.se>2017-04-09 01:25:58 +0200
commitf01822fbfc55fa0cdde361c179f02b044ceb7bcf (patch)
treea7e90b6f576bc528b0ad1033667f07f208df5497
parentf2f1aa7473e3e9c668a77044c93560e3c914cc50 (diff)
parent54fea3aeec367884bd249ca317662eac07c66861 (diff)
downloadprosody-f01822fbfc55fa0cdde361c179f02b044ceb7bcf.tar.gz
prosody-f01822fbfc55fa0cdde361c179f02b044ceb7bcf.zip
Merge 0.10->trunk
-rwxr-xr-xprosodyctl7
-rw-r--r--tools/migration/migrator/prosody_sql.lua2
2 files changed, 8 insertions, 1 deletions
diff --git a/prosodyctl b/prosodyctl
index ba12ebe0..b7f0d06c 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
diff --git a/tools/migration/migrator/prosody_sql.lua b/tools/migration/migrator/prosody_sql.lua
index 3324c819..eed499d2 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