hard20 pts · first answer countspostgresqldata-modelling
Unique email with soft deletes
users has UNIQUE(email) and soft deletes via a deleted_at column. A user deletes their account and later signs up again with the same email, which fails with a unique violation. What is the best fix in PostgreSQL?