Open TravisWhitaker opened 8 years ago
I'm in favor of an is_deleted
attribute. Especially if we can come up with a way to automatically include that constraint when we're writing queries. If not, human discipline is a poor but acceptable substitute.
Hasql (reasonably) doesn't include support for Postgres' query templating, so short of using TH I don't think there's a way to automatically rewrite queries to include the "is_deleted" flag. しかたがない。
Tragic.
There are two strategies when dealing with deletion. We could actually remove rows from the database when deletes are requested, or we could have an "is_deleted" flag to guard against human stupidity. I'm personally leaning towards "is_deleted," but some people object to this, as it's something you have to remember to take into account in each and every query.
Thoughts?