aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/mysql/active_schema_test.rb
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-08-12 14:23:14 -0600
committerSean Griffin <sean@thoughtbot.com>2014-08-12 14:40:11 -0600
commitea3ba34506c72d636096245016b5ef9cfe27c566 (patch)
treedd7f1c1ca5d3afafa56f914556dfe7acc7d6c414 /activerecord/test/cases/adapters/mysql/active_schema_test.rb
parent82e28492e7c581cdeea904464a18eb11118f4ac0 (diff)
downloadrails-ea3ba34506c72d636096245016b5ef9cfe27c566.tar.gz
rails-ea3ba34506c72d636096245016b5ef9cfe27c566.tar.bz2
rails-ea3ba34506c72d636096245016b5ef9cfe27c566.zip
Change the default `null` value for timestamps
As per discussion, this changes the model generators to specify `null: false` for timestamp columns. A warning is now emitted if `timestamps` is called without a `null` option specified, so we can safely change the behavior when no option is specified in Rails 5.
Diffstat (limited to 'activerecord/test/cases/adapters/mysql/active_schema_test.rb')
-rw-r--r--activerecord/test/cases/adapters/mysql/active_schema_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/adapters/mysql/active_schema_test.rb b/activerecord/test/cases/adapters/mysql/active_schema_test.rb
index 7c0f11b033..a84673e452 100644
--- a/activerecord/test/cases/adapters/mysql/active_schema_test.rb
+++ b/activerecord/test/cases/adapters/mysql/active_schema_test.rb
@@ -105,7 +105,7 @@ class ActiveSchemaTest < ActiveRecord::TestCase
with_real_execute do
begin
ActiveRecord::Base.connection.create_table :delete_me do |t|
- t.timestamps
+ t.timestamps null: true
end
ActiveRecord::Base.connection.remove_timestamps :delete_me
assert !column_present?('delete_me', 'updated_at', 'datetime')