# HG changeset patch # User Matthew Wild # Date 1372094944 -3600 # Node ID 177fe6978ba8c1f22302184227df3c67d3bc35fd # Parent e66bbfdf588e530051a459b3503e66f4830c62e6# Parent 254a9420e53d49a1cfc585df4c903bde3a7212c2 Merge 0.9->trunk diff -r e66bbfdf588e -r 177fe6978ba8 plugins/mod_storage_sql2.lua --- a/plugins/mod_storage_sql2.lua Thu Jun 20 21:47:38 2013 +0200 +++ b/plugins/mod_storage_sql2.lua Mon Jun 24 18:29:04 2013 +0100 @@ -85,7 +85,7 @@ 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));