-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
The goal of this task is to provide automatic management of created_at and updated_at for models. it consists of three changes.
Schemas
Schemas will automatically generate inserted_at and updated_at fields. @timestamps false can be set before the schema/2 to avoid generating timestamps and @timestamps Type can be used to give the generated timestamps a custom time.
Migrations
Migrations will automatically generate inserted_at and updated_at fields. timestamps: false can be given to table/2 to not generate a timestamp or customize its type.
Ecto.Model.Timestamps
Ecto.Model.Timestamps will include a before_insert and a before_update callback into the model that automatically sets the inserted_at and updated_at values if such fields exist in the model and are not set in the changeset.
Metadata
Metadata
Assignees
Labels
No labels