Convert the mysql database to use utf8 for its character set and collation. This will allow us to store arabic and cyrillic text
user
```ruby
class ConvertTablesToUnicode < ActiveRecord::Migration
  def self.up
    charset = 'utf8'
    collation = 'utf8_general_ci'
    execute "ALTER DATABASE #{connection.current_database} CHARACTER SET #{charset} COLLATE #{collation}"
    connection.tables.each do |table|
      execute "ALTER TABLE #{table} CONVERT TO CHARACTER SET #{charset} COLLATE #{collation}"
    end
  end
  def self.down
    raise ActiveRecord::IrreversibleMigration.new()
  end
  def self.connection
    ActiveRecord::Base.connection
  end
end

```
assistant