4 ms·
It 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 make
by nickjj 4y ago
It 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.