aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_storage_sql.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-04-12 23:16:23 +0200
committerKim Alvefur <zash@zash.se>2017-04-12 23:16:23 +0200
commit8aaba129330f4d197c648464cc9312c95b727553 (patch)
tree665686235bf0fc7087b097450d541aa62086cff1 /plugins/mod_storage_sql.lua
parentd938b42d8f9f4d2108383167c3b8139ad5157816 (diff)
downloadprosody-8aaba129330f4d197c648464cc9312c95b727553.tar.gz
prosody-8aaba129330f4d197c648464cc9312c95b727553.zip
mod_storage_sql: Break long lines
Diffstat (limited to 'plugins/mod_storage_sql.lua')
-rw-r--r--plugins/mod_storage_sql.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua
index 9f33d987..9f2933a0 100644
--- a/plugins/mod_storage_sql.lua
+++ b/plugins/mod_storage_sql.lua
@@ -484,7 +484,8 @@ local function upgrade_table(engine, params, apply_changes) -- luacheck: ignore
local check_encoding_query = [[
SELECT "COLUMN_NAME","COLUMN_TYPE","TABLE_NAME"
FROM "information_schema"."columns"
- WHERE "TABLE_NAME" LIKE 'prosody%%' AND ( "CHARACTER_SET_NAME"!=? OR "COLLATION_NAME"!=?);
+ WHERE "TABLE_NAME" LIKE 'prosody%%'
+ AND ( "CHARACTER_SET_NAME"!=? OR "COLLATION_NAME"!=?);
]];
-- FIXME Is it ok to ignore the return values from this?
engine:transaction(function()
@@ -506,7 +507,9 @@ local function upgrade_table(engine, params, apply_changes) -- luacheck: ignore
end
end
end);
- success,err = engine:transaction(function() return engine:execute(check_encoding_query, engine.charset, engine.charset.."_bin"); end);
+ success,err = engine:transaction(function()
+ return engine:execute(check_encoding_query, engine.charset, engine.charset.."_bin");
+ end);
if not success then
module:log("error", "Failed to check/upgrade database encoding: %s", err or "unknown error");
return false;