Boolean values are often unnecessary if an action timestamp conveys the information. For example, we currently use a boolean isSubscribed field on subscriptions to convey whether the subscription is active. Instead, an unsubscribedAt timestamp would convey more information:
- If it's present, the user is unsubscribed
- If it's not present, the user is subscribed
- The
updatedAt and unsubscribedAt fields can convey different information (the unsubscribedAt timestamp is a definite action taken at a specific time, the updatedAt value is updated whenever a record changes).
Boolean values are often unnecessary if an action timestamp conveys the information. For example, we currently use a boolean
isSubscribedfield on subscriptions to convey whether the subscription is active. Instead, anunsubscribedAttimestamp would convey more information:updatedAtandunsubscribedAtfields can convey different information (theunsubscribedAttimestamp is a definite action taken at a specific time, theupdatedAtvalue is updated whenever a record changes).