# HG changeset patch # User Kim Alvefur # Date 1492026677 -7200 # Node ID b058fc4a4243974950b8e148142ee5b53dce808d # Parent 29b3957db21230f7844ac458e173afbd61189b03 mod_storage_sql: Quote some field names diff -r 29b3957db212 -r b058fc4a4243 plugins/mod_storage_sql.lua --- a/plugins/mod_storage_sql.lua Wed Apr 12 18:57:40 2017 +0200 +++ b/plugins/mod_storage_sql.lua Wed Apr 12 21:51:17 2017 +0200 @@ -462,12 +462,12 @@ 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