我有一个带有mysql数据库的 rails 3.2.14 应用程序。
我有以下内容migration:
class CreateGames < ActiveRecord::Migration
def change
create_table :games,:options => 'CHARSET=utf8' do |t|
t.char :recsts
t.string :name
end
end
end
我得到一个错误,因为char不支持。此外,t.string会生成varchar(255)但我需要的是nvarchar(10).
所以我想知道是否有解决方案,如果没有,我将不得不放弃 Rails DB 迁移。