aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-06-03 21:41:40 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-06-03 21:41:40 +0000
commit7f00f51239f112ef6c70293665bcf0a5e2c313db (patch)
treef04b9440378e3fd5dbaad82511562c25a65aa5ad /activerecord/test
parent3e67e0b3b2c192335daeede83430dc6e5042fec3 (diff)
downloadrails-7f00f51239f112ef6c70293665bcf0a5e2c313db.tar.gz
rails-7f00f51239f112ef6c70293665bcf0a5e2c313db.tar.bz2
rails-7f00f51239f112ef6c70293665bcf0a5e2c313db.zip
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
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/migration_test.rb3
1 files changed, 2 insertions, 1 deletions
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)"