3 ms·
Wouldn't this be better handled by marking the user entry as inactive and then reading that value from the join rather than setting every conversation thread as
by ttfkam 4y ago
Wouldn't this be better handled by marking the user entry as inactive and then reading that value from the join rather than setting every conversation thread as is_deleted/is_deactivated?
I feel like you are solving a different problem than the one presented in the article.
- nickjj 4y agoIt was more about the comment I was replying to around a use case where historical data is important to keep around. Marking it as inactive with a boolean makes you lose the context on when the inactive toggle happened. Chances are you want to use deleted_at on the user in my use case because that provides you the timestamp of when it happened and also lets you have application logic which prevents that user from being able to login and do things, but still lets you show their previous information to everyone else as if they didn't leave and all you have to do is have a tiny bit of template logic that appends " (Deactivated)" to their name if `deleted_at` is not NULL.