From 44116c253fd528c81a1169a2b835eae063e9303b Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 12 Apr 2017 21:51:17 +0200 Subject: mod_storage_sql: Quote some field names --- plugins/mod_storage_sql.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/mod_storage_sql.lua') 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 -- cgit v1.2.3