From 083c3ee659c6c5542687f3bafae68cbc24dbc90f Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Sat, 25 Jun 2022 18:07:39 +0800 Subject: db: refactor "action" table to use GORM (#7054) Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> --- internal/db/user_mail.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/db/user_mail.go') diff --git a/internal/db/user_mail.go b/internal/db/user_mail.go index fc6e1618..fc6356fe 100644 --- a/internal/db/user_mail.go +++ b/internal/db/user_mail.go @@ -16,9 +16,9 @@ import ( // primary email address, but is not obligatory. type EmailAddress struct { ID int64 - UID int64 `xorm:"INDEX NOT NULL" gorm:"INDEX"` - Email string `xorm:"UNIQUE NOT NULL" gorm:"UNIQUE"` - IsActivated bool `gorm:"NOT NULL;DEFAULT:FALSE"` + UID int64 `xorm:"INDEX NOT NULL" gorm:"index;not null"` + Email string `xorm:"UNIQUE NOT NULL" gorm:"unique;not null"` + IsActivated bool `gorm:"not null;default:FALSE"` IsPrimary bool `xorm:"-" gorm:"-" json:"-"` } -- cgit v1.2.3