Lately I've been doing quite a few projects that require the use of back-end, including MySQL.
However I'm quite sick of adding the columns dt_created
and dt_modified
(which are date time stamps for creation and last modified respectively) to all the tables I have in my database.
Everytime I INSERT
or UPDATE
the database, I will have to use NOW()
where appropriately. This is going all over my persistence.
Is there any efficient alternative where MySQL can automatically store at least the datatime of the row that is inserted and let me retrieve it?