jump to navigation

MySQL column defaults ActiveRecord::SchemaDumper February 26, 2008

Posted by John Dewey in ActiveRecord, Database, MySQL, Rails.

ActiveRecord::SchemaDumper will use empty strings as the default value for a column marked as NOT NULL, in MySQL versions < 5.0.51.  This behavior recently changeddefaulting to null (nil).  This caused our specs to fail for various reasons.  Something to keep in mind when upgrading.  We had been coding to a MySQL bug.



No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: