Partial unique indexes are database indexes with a WHERE clause (predicate), supported by PostgreSQL.

Use case in thesis project: With soft deletions, unique constraints on fields like names prevent reusing values from soft-deleted entries. Partial indexes allow enforcing uniqueness only on active (non-deleted) records.

Not supported in Drizzle ORM.

Sources