currently I am using a postgres query to create two unique indexes.
Each index consists of two columns, where the value of one column is checked for null/not null:
CREATE UNIQUE INDEX deleted_not_null_idx
ON user (ADDRESS, DELETED)
WHERE DELETED IS NOT NULL;
CREATE UNIQUE INDEX deleted_null_idx
ON user (ADDRESS)
WHERE DELETED IS NULL;
I am attempting to do the same on H2 but I am having issues understanding the syntax and structure of H2.
How would this expression be formed if written using H2 syntax?