t.text :content, :null => false, :default => ''
Mysql2::Error: BLOB/TEXT column 'content' can't have a default value
查到 This is a problem, which happens with MySql (e.g. 5.0.37, 5.0.41) at least in Windows. 07 年的帖子
可是同事的 ubuntu 下 啥也没有,他们的版本是 5.5+
这是俺的版本
mysql --version
mysql Ver 14.14 Distrib 5.6.13, for osx10.8 (x86_64)
按照这么做了,木效果
set @orig_mode = @@global.sql_mode ...
http://stackoverflow.com/questions/3466872/why-cant-a-text-column-have-a-default-value-in-mysql
大神们 help