aboutsummaryrefslogtreecommitdiffstats
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
commita03638bd16746c0a2d9a3fcb682d5026104edaf2 (patch)
treeea0823f388e3a9b1f1caf18b531db3c6694db648
parentb3cd19063f63fa426f35523bfb77be45d1e0dd4e (diff)
downloadprosody-a03638bd16746c0a2d9a3fcb682d5026104edaf2.tar.gz
prosody-a03638bd16746c0a2d9a3fcb682d5026104edaf2.zip
mod_storage_sql: Quote some field names
-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