Ecto.Schema.timestamps
You're seeing just the macro
timestamps
, go back to Ecto.Schema module for more information.
Generates :inserted_at
and :updated_at
timestamp fields.
The fields generated by this macro will automatically be set to the current time when inserting and updating values in a repository.
Options
:inserted_at
- the Ecto schema name of the field for insertion times orfalse
:updated_at
- the Ecto schema name of the field for update times orfalse
:inserted_at_source
- the name of the database column for insertion times orfalse
:updated_at_source
- the name of the database column for update times orfalse
:type
- the timestamps type, defaults to:naive_datetime
.:autogenerate
- a module-function-args tuple used for generating bothinserted_at
andupdated_at
timestamps
All options can be pre-configured by setting @timestamps_opts
.