instance method
timestamps
Ruby on Rails 6.0.6
Since v2.2.3Signature
timestamps(**options)
Adds timestamps (created_at and updated_at) columns to the table.
t.timestamps(null: false)
Parameters
-
optionskeyrest
Source
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 598
def timestamps(**options)
@base.add_timestamps(name, **options)
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb line 598
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::Table