aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2014-07-22 09:05:33 +0200
committerYves Senn <yves.senn@gmail.com>2014-07-22 09:07:31 +0200
commit4c81c8ce533896be28bdc0b055ff30bb9dee1316 (patch)
tree7b61edacd064013753420c1f32f082bb98755ef3 /activerecord/test
parent30a38181f88aa80d6054b4fed5812a4c695b073d (diff)
downloadrails-4c81c8ce533896be28bdc0b055ff30bb9dee1316.tar.gz
rails-4c81c8ce533896be28bdc0b055ff30bb9dee1316.tar.bz2
rails-4c81c8ce533896be28bdc0b055ff30bb9dee1316.zip
build fix, remove not null constraint.
The fixtures are still in play, adding a new column without a default and `null: true` is not possible. This reverts back to leaking global state, as our `schema.rb` adds the `null: false` constraint on this field. A future solution would be to make the `migration_test.rb` run independent of fixture tables. This way we can simply drop the state after test execution, without worrying about side effects. /cc @zuhao
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/migration_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb
index 2a00b2a3a6..ef3f073472 100644
--- a/activerecord/test/cases/migration_test.rb
+++ b/activerecord/test/cases/migration_test.rb
@@ -63,7 +63,7 @@ class MigrationTest < ActiveRecord::TestCase
end
Person.connection.remove_column("people", "first_name") rescue nil
Person.connection.remove_column("people", "middle_name") rescue nil
- Person.connection.add_column("people", "first_name", :string, null: false)
+ Person.connection.add_column("people", "first_name", :string)
Person.reset_column_information
end