Today, somebody asked me how he could track the creation of a record (who created it and when) and who and when it was last modified.
Usually, this is performed in a different table, called audit table. In MySQL you can create an audit table and populate it using triggers.
But of course, this person had some constraints, otherwise it would have been too easy:
- no other table could be used/created
- the application should keep working without any changes
He was desperate for help…
MySQL 8.0 Invisible Columns
The answer is : Invisible Columns.
Let’s have a look at a simple table, containing an ID as primary key, a first name and a last name. And of course the application must work as expected… and unfortunately, it seems the application is …[Read more]