mirror of
https://github.com/github/rails.git
synced 2026-01-28 15:58:03 -05:00
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: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
committed by
Jeremy Kemper
parent
52e15abbed
commit
fa795ccfad
@@ -5,7 +5,7 @@ require 'models/entrant'
|
||||
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 }
|
||||
|
||||
Reference in New Issue
Block a user