aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
diff options
context:
space:
mode:
authorMike Perham <mperham@gmail.com>2011-10-14 21:09:53 -0700
committerMike Perham <mperham@gmail.com>2011-10-14 21:09:53 -0700
commit3dbedd2823ff6c8a1f2f078ae9df9c6ceb275e1b (patch)
treea0580734399025a32c6be877c2f96d8955dbb1a2 /activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
parente759c8882a990606bb4aee8a643431ebe544c69f (diff)
downloadrails-3dbedd2823ff6c8a1f2f078ae9df9c6ceb275e1b.tar.gz
rails-3dbedd2823ff6c8a1f2f078ae9df9c6ceb275e1b.tar.bz2
rails-3dbedd2823ff6c8a1f2f078ae9df9c6ceb275e1b.zip
Default timestamps to non-null
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
index 8e3ba1297e..b4a9e29ef1 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -507,8 +507,8 @@ module ActiveRecord
# ===== Examples
# add_timestamps(:suppliers)
def add_timestamps(table_name)
- add_column table_name, :created_at, :datetime
- add_column table_name, :updated_at, :datetime
+ add_column table_name, :created_at, :datetime, :null => false
+ add_column table_name, :updated_at, :datetime, :null => false
end
# Removes the timestamp columns (created_at and updated_at) from the table definition.