2013-05-26 19:32:54 +02:00
|
|
|
class ChangeTablesToUtf8mb4 < ActiveRecord::Migration
|
|
|
|
def up
|
2014-01-09 06:01:45 +01:00
|
|
|
return if connection.adapter_name !~ /Mysql/
|
|
|
|
|
2013-05-26 19:32:54 +02:00
|
|
|
[ "comments", "invitations", "messages", "moderations", "stories", "users" ].each do |t|
|
|
|
|
execute("alter table #{t} convert to character set utf8mb4")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
end
|
|
|
|
end
|