Join Slack
Powered by
Hi, is there any way to make a nullable column uni...
# orm-help
y
Yaakov
08/11/2022, 2:46 PM
Hi, is there any way to make a nullable column unique?
✅ 1
👀 1
n
Nurul
08/11/2022, 4:38 PM
Hey 👋 You would need to create a partial index on the column to avoid null values for the uniqueness constraint.
y
Yaakov
08/11/2022, 7:14 PM
@Nurul
I'm not sure what you mean. Do you have an example?
n
Nurul
08/12/2022, 11:12 AM
Hey Yaakov, can you have a look at this
StackOverflow answer
, this describes what I meant by creating partial index
3
Views
Open in Slack
Previous
Next