Hi guys,
I am trying to create unique fields on Postgresql.
The idea is, if organizationId is provided, then the group should be unique. If not, then it should be unique without counting organizationId.
The issue i am having, is if there is discount provided without organizationId, and same discount WITH organizationId is attached. Then it will throw constraint error.
Can i create unique fields where the group would be different if there is organizationId or not?