journalduhacker/db/migrate/20130526164230_change_tables_to_utf8mb4.rb
2014-01-14 21:42:27 -05:00

13 lines
309 B
Ruby

class ChangeTablesToUtf8mb4 < ActiveRecord::Migration
def up
return if connection.adapter_name !~ /Mysql/
[ "comments", "invitations", "messages", "moderations", "stories", "users" ].each do |t|
execute("alter table #{t} convert to character set utf8mb4")
end
end
def down
end
end