aboutsummaryrefslogtreecommitdiff
path: root/internal/db/user_mail.go
diff options
context:
space:
mode:
authorJoe Chen <jc@unknwon.io>2022-06-25 18:07:39 +0800
committerGitHub <noreply@github.com>2022-06-25 18:07:39 +0800
commit083c3ee659c6c5542687f3bafae68cbc24dbc90f (patch)
tree0103bf3b5c5ebfccd368a7cb6a425a521fd669d9 /internal/db/user_mail.go
parent9df4e3ae3c555a86f691f0d78a43834842e77d8b (diff)
db: refactor "action" table to use GORM (#7054)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Diffstat (limited to 'internal/db/user_mail.go')
-rw-r--r--internal/db/user_mail.go6
1 files changed, 3 insertions, 3 deletions
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:"-"`
}