mudspot
Dropping created_at in favor of UUIDv7? (Ash-3.1)
Hi all
I have started a brand new project. Usually, I would have created a pair of timestamp attributes created_at and updated_at.
Now with the UUIDv7 type, I’m seriously considering dropping created_at altogether.
Comments on pros and cons?
PS. I do want to display record creation date in some places.
Best regards
Most Liked
frankdugan3
I feel like it’s good enough to replace created_at if you will only need the timestamp as a default sort or for forensic/recovery usage. If you will be using and regularly displaying the timestamp, I’d probably keep the timestamps columns both for simplicity and performance.
Asd
If you use UUIDv7 for timestamps, than consider moving a data from one table to another. You’ll also have to copy a UUID from the past into new place in the table (otherwise you’ll lose inserted_at logic), which break this clustered index feature of the UUIDv7.
I’d keep two columns







