aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
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)"