I set 'unique constraint' on schema.prisma but I couldn't look at the application of unique constraint on target DB

18 views Asked by At

I'm a nestjs developer, and I'm using prisma for connecting to postgresql from nestjs.

As you see this post's title, I applied 'unique constraint' to a specific field on schema.prisma file and I also did prisma migrate. But I couldn't check this application on my DB (postgresql). I'm using pgAdmin4 for managing my postgresql.

// schema.prisma

model User {
  ...
  email String @unique
  ...
}

enter image description here

If that unique constraint was applied well, why didn't pgAdmin4 show this unique constraint?

I will wish to get a good answer.

Thank you!

0

There are 0 answers