From 49659c5ece39196a2c9f785cdf7c39d0b87593d5 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 23 Jun 2013 19:27:49 +0200 Subject: mod_storage_sql2: Use correct variable (Thanks SkyBlue and Florob) --- plugins/mod_storage_sql2.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_storage_sql2.lua b/plugins/mod_storage_sql2.lua index 7d705b0b..382c0e23 100644 --- a/plugins/mod_storage_sql2.lua +++ b/plugins/mod_storage_sql2.lua @@ -85,7 +85,7 @@ local function set_encoding() module:log("warn", "Found %d columns in prosody table requiring encoding change, updating now...", n_bad_columns); local fix_column_query1 = "ALTER TABLE `prosody` CHANGE `%s` `%s` BLOB;"; local fix_column_query2 = "ALTER TABLE `prosody` CHANGE `%s` `%s` %s CHARACTER SET 'utf8' COLLATE 'utf8_bin';"; - for row in success:rows() do + for row in result:rows() do local column_name, column_type = unpack(row); engine:execute(fix_column_query1:format(column_name, column_name)); engine:execute(fix_column_query2:format(column_name, column_name, column_type)); -- cgit v1.2.3