Unique index studio

Hi guys,
this is in my opinion very important, when creating unique index, to have option for ignoring null values eg.
create unique NONCLUSTERED index IDX_MY_TAB_UNQ on MY_TAB(USER_ID, DELETE_TS) WHERE USER_ID is not null

Otherwise it is usable only for mandatory fields.
I am not sure if all DB types support this (coming from mssql)

Hi Michal,

Thank you for the idea, I’ve created an issue.

Just my 5 cents.
This problem is not relevant for postgres which ignores null values for unique indexes.

Null values are not considered equal.
PostgreSQL: Documentation: 9.6: Unique Indexes

1 Like

I switched from postgres to sqlserver and running into this issue. It seems sqlserver specific.

I see this issue is already quite old, is it still planned?

This is only a fix in studio right? just change the index to the nonclustered for nullable unique constraints,

Unfortunately not, it’s not planned yet.

This issue has been around for ages. and every so many months I run into this issue again.

Could this please be picked up?

thx.

Hi Tom
CUBA is in maintenance mode and we are going to fix only critical issues, as well as support newer versions of IntelliJ.
If you face this problem in Jmix, please report on forum.jmix.io.

Regards,
Konstantin

1 Like