-
-
Save TimLang/ffc7c03cf277fd83526194b831289fd1 to your computer and use it in GitHub Desktop.
Revisions
-
sukeerthiadiga revised this gist
Sep 23, 2012 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,12 @@ locate my.cnf change character set and collation [mysqld] character_set_server = utf8 collation_server = utf8_general_ci in console if your database is not huge. ActiveRecord::Base.connection.tables.each do |table| ActiveRecord::Base.connection.execute "ALTER TABLE #{table} CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;" -
sukeerthiadiga created this gist
Sep 23, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ in console if your database is not huge. ActiveRecord::Base.connection.tables.each do |table| ActiveRecord::Base.connection.execute "ALTER TABLE #{table} CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;" end