Add guide for helping with created_at and updated_at timestamps
See original GitHub issueLet’s add a guide to help users model created_at
and updated_at
timestamps.
For created_at
a default value of now()
works.
For updated_at
a trigger on the lines of: https://x-team.com/blog/automatic-timestamps-with-postgresql/
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:12 (2 by maintainers)
Top Results From Across the Web
add created_at and updated_at fields to mongoose schemas
This will automatically add createdAt and updatedAt fields to your schema. http://mongoosejs.com/docs/guide.html#timestamps.
Read more >Introducing $createdAt And $updatedAt On Each Resource
In our latest 0.15 release, we introduced many exciting new features, one among them is the addition of two new timestamp attributes $createdAt...
Read more >Mongoose Timestamps
Mongoose schemas support a timestamps option. If you set timestamps: true , Mongoose will add two properties of type Date to your schema:...
Read more >Schema - Dynamoose
This setting lets you indicate to Dynamoose that you would like it to handle storing timestamps in your items for both creation and...
Read more >How to persist creation and update timestamps with Hibernate
Storing the creation timestamp or the timestamp of the last update is a common requirement for modern applications. It sounds like a simple...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the Frequently used columns feature👍 However, it would be super nice if this feature was also available on the Modify-tab so it can be used on tables already created.
created_at
andupdated_at
automatic timestamps are so commonly used. I think there should be an option to set the timestamp field to automatically handle this when creating the schema.By the way the link posted is broken, this is the working link: https://x-team.com/blog/automatic-timestamps-with-postgresql/