method

timestamps

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ActiveRecord::ConnectionAdapters::Table
timestamps(options = {}) public

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

t.timestamps(null: false)

See {connection.add_timestamps}[rdoc-ref:SchemaStatements#add_timestamps]

Show source
Register or log in to add new notes.