From 7f00f51239f112ef6c70293665bcf0a5e2c313db Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 3 Jun 2006 21:41:40 +0000 Subject: Fixed migration trouble with SQLite when NOT NULL is used in the new definition (closes #5215) [greg@lapcominc.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4419 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/migration_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activerecord/test') diff --git a/activerecord/test/migration_test.rb b/activerecord/test/migration_test.rb index 0f837841e1..88a94d8710 100644 --- a/activerecord/test/migration_test.rb +++ b/activerecord/test/migration_test.rb @@ -173,7 +173,8 @@ if ActiveRecord::Base.connection.supports_migrations? Person.connection.create_table :testings do |t| t.column :foo, :string end - Person.connection.add_column :testings, :bar, :string, :null => false, :default => "default" + Person.connection.execute "insert into testings (foo) values ('hello')" + assert_nothing_raised {Person.connection.add_column :testings, :bar, :string, :null => false, :default => "default" } assert_raises(ActiveRecord::StatementInvalid) do Person.connection.execute "insert into testings (foo, bar) values ('hello', NULL)" -- cgit v1.2.3