diff options
author | Kim Alvefur <zash@zash.se> | 2017-04-12 21:51:17 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-04-12 21:51:17 +0200 |
commit | a03638bd16746c0a2d9a3fcb682d5026104edaf2 (patch) | |
tree | ea0823f388e3a9b1f1caf18b531db3c6694db648 /plugins | |
parent | b3cd19063f63fa426f35523bfb77be45d1e0dd4e (diff) | |
download | prosody-a03638bd16746c0a2d9a3fcb682d5026104edaf2.tar.gz prosody-a03638bd16746c0a2d9a3fcb682d5026104edaf2.zip |
mod_storage_sql: Quote some field names
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_storage_sql.lua | 4 |
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 |