journalduhacker/db/migrate/20130526164230_change_tables_to_utf8mb4.rb

11 lines
259 B
Ruby

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