From 85c86f09997fff1f07f5d58ecf69780d597e292c Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 8 Oct 2007 03:28:28 +0000 Subject: MySQL: fix change_column on not-null columns that don't accept dfeault values of ''. Closes #6663. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7790 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/migration_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'activerecord/test') diff --git a/activerecord/test/migration_test.rb b/activerecord/test/migration_test.rb index a1eda28aa4..13c9dc692a 100644 --- a/activerecord/test/migration_test.rb +++ b/activerecord/test/migration_test.rb @@ -429,6 +429,16 @@ if ActiveRecord::Base.connection.supports_migrations? Person.connection.add_column("people", "first_name", :string) rescue nil end end + + def test_change_type_of_not_null_column + assert_nothing_raised do + Topic.connection.change_column "topics", "written_on", :datetime, :null => false + Topic.reset_column_information + + Topic.connection.change_column "topics", "written_on", :datetime, :null => false + Topic.reset_column_information + end + end def test_rename_table begin -- cgit v1.2.3