delete approach? Option one is to go with the 'deletedAt' and filter "where deletedAt is NULL", option two would be to go with the flag approach, adding designated column 'isDeleted' and have a partial index on it. I`ve seen both, like the latter one better, but definitely opened to any opinions
When you already have a timestamp handling when a record has been changed, I would go for the boolean. And personally I dislike handling NULL as values as it is by definition the absence of value.
Обсуждают сегодня