"Soft-delete" gem for Rails. It can enable the unique constraint by database.