Method: ActiveRecord::ConnectionAdapters::Table#timestamps

Defined in:
activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb

#timestamps(**options) ⇒ Object

Adds timestamps (created_at and updated_at) columns to the table.

t.timestamps(null: false)

See connection.add_timestamps



786
787
788
789
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 786

def timestamps(**options)
  raise_on_if_exist_options(options)
  @base.add_timestamps(name, **options)
end