aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-04-12 21:51:17 +0200
committerKim Alvefur <zash@zash.se>2017-04-12 21:51:17 +0200
commit44116c253fd528c81a1169a2b835eae063e9303b (patch)
treeea0823f388e3a9b1f1caf18b531db3c6694db648 /plugins
parent2b914fee7d809f0666ca96db8ee49dd4f64db66c (diff)
downloadprosody-44116c253fd528c81a1169a2b835eae063e9303b.tar.gz
prosody-44116c253fd528c81a1169a2b835eae063e9303b.zip
mod_storage_sql: Quote some field names
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_storage_sql.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua
index b49551d6..d9e45781 100644
--- a/plugins/mod_storage_sql.lua
+++ b/plugins/mod_storage_sql.lua
@@ -462,12 +462,12 @@ local function upgrade_table(engine, params, apply_changes) -- luacheck: ignore
local changes = false;
if params.driver == "MySQL" then
local success,err = engine:transaction(function()
- local result = engine:execute("SHOW COLUMNS FROM prosody WHERE Field='value' and Type='text'");
+ local result = engine:execute("SHOW COLUMNS FROM \"prosody\" WHERE \"Field\"='value' and \"Type\"='text'");
if result:rowcount() > 0 then
changes = true;
if apply_changes then
module:log("info", "Upgrading database schema...");
- engine:execute("ALTER TABLE prosody MODIFY COLUMN \"value\" MEDIUMTEXT");
+ engine:execute("ALTER TABLE \"prosody\" MODIFY COLUMN \"value\" MEDIUMTEXT");
module:log("info", "Database table automatically upgraded");
end
end