提交 fa795ccf 编写于 作者: T Tarmo Tänav 提交者: Jeremy Kemper

Include mysql older than 5.1.23 in the 5.1 series in the list of those that...

Include mysql older than 5.1.23 in the 5.1 series in the list of those that can't handle NULL defaults
Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
上级 52e15abb
......@@ -5,7 +5,7 @@
class DefaultTest < ActiveRecord::TestCase
def test_nil_defaults_for_not_null_columns
column_defaults =
if current_adapter?(:MysqlAdapter) && Mysql.client_version < 50051
if current_adapter?(:MysqlAdapter) && (Mysql.client_version < 50051 || (50100..50122).include?(Mysql.client_version))
{ 'id' => nil, 'name' => '', 'course_id' => nil }
else
{ 'id' => nil, 'name' => nil, 'course_id' => nil }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册