Permalink
Browse files

Include mysql older than 5.1.23 in the 5.1 series in the list of thos…

…e that can't handle NULL defaults

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
1 parent 813290d commit ac7a0209bbd92b543e50ee6c8641998c7f04c3c1 @tarmo tarmo committed with jeremy Aug 26, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/test/cases/defaults_test.rb
View
2 activerecord/test/cases/defaults_test.rb
@@ -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 }

0 comments on commit ac7a020

Please sign in to comment.