Ecto Postgres Index vs Unique Index

Interesting, thanks for the answer.

Does that mean where you already have an index like create index(:projects, [:organization_id])

But you want to make sure that every project within an organization has a unique name, you should add a unique constraint instead of a unique index?

But with joins tables like :teams_users you should create a unique_index on the :team_id and :user_id rather than an index on each individually?