From d5346f0c4342a00174ef69b64d6627c426e58274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Thu, 27 Jun 2024 07:27:12 +0000 Subject: [PATCH] fix: use unique in model --- adapters/adapter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapters/adapter.go b/adapters/adapter.go index a694f4b..31cdbb2 100644 --- a/adapters/adapter.go +++ b/adapters/adapter.go @@ -93,7 +93,7 @@ type GothUser struct { // Name is the name of the user. Name string `json:"name" validate:"required,max=255"` // Email is the email of the user. - Email string `json:"email" gorm:"uniqueIndex" validate:"required,email"` + Email string `json:"email" gorm:"unique" validate:"required,email"` // EmailVerified is true if the email is verified. EmailVerified *bool `json:"email_verified"` // Image is the image URL of the user.