Ecto.Schema.timestamps

You're seeing just the macro timestamps, go back to Ecto.Schema module for more information.
Link to this macro

timestamps(opts \\ [])

View Source (macro)

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 or false
  • :updated_at - the Ecto schema name of the field for update times or false
  • :inserted_at_source - the name of the database column for insertion times or false
  • :updated_at_source - the name of the database column for update times or false
  • :type - the timestamps type, defaults to :naive_datetime.
  • :autogenerate - a module-function-args tuple used for generating both inserted_at and updated_at timestamps

All options can be pre-configured by setting @timestamps_opts.