this post was submitted on 29 Jun 2023
117 points (97.6% liked)
Programming
17378 readers
362 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
That sounds good until you realize you now have two sources of truth, do you trust
enabled
orenabled_date
? If you really want to go this routeenabled
should be a virtual field that checksenabled_date
in the background so you can have the boolean semantics but still keep a single field.I also used booleans a lot previously but since using Laravel I have come to enjoy the
updated_at
,created_at
anddeleted_at
fields that it automatically creates and I follow this format as well now if I need more.