Skip to content

How to setup unique constraint with soft delete enabled #7799

You must be logged in to vote

Hey @jdinartejesus,

If you are using postgres 15 or newer you can use new constraint UNIQUE NULLS NOT DISTINCT. If not than it is possible only via workaround like not using null.

More on stackoverflow question.

Replies: 1 comment 2 replies

You must be logged in to vote
2 replies
@talgat-ruby

Answer selected by talgat-ruby
@jdinartejesus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants