Add unique constraint to an existing PostgreSQL index
There is no way to change an index to unique index. You can see what you can change to index at alter index document.
In this case you need to drop and create new unique index.
There is no way to change an index to unique index. You can see what you can change to index at alter index document.
In this case you need to drop and create new unique index.