wise-coders / dbschema

DbSchema Database Designer
https://dbschema.com
72 stars 3 forks source link

Postgres partial unique index #56

Closed michaelstack closed 2 years ago

michaelstack commented 2 years ago

Postgres supports partial unique indexes.

The relevant docs are at https://www.postgresql.org/docs/current/indexes-partial.html

I am working on a postgres database managed by dbschema. I want to create a partial unique index. It looks like these are not supported in the UI.

If this is supported in the UI could you please tell me where I should be looking in the docs? If it is not supported, is there a workaround?

wise-coders commented 2 years ago

In the Index dialog, use the Options combo to add the where clause: image

I have checked, and this indexes are also reversed engineer correctly from the database:

image

michaelstack commented 2 years ago

That's awesome!

Thanks for the quick response.