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