Software /
code /
prosody
Changeset
8079:b058fc4a4243
mod_storage_sql: Quote some field names
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 12 Apr 2017 21:51:17 +0200 (2017-04-12) |
parents | 8077:29b3957db212 |
children | 8080:8833f2ca6e53 |
files | plugins/mod_storage_sql.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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