diff options
Diffstat (limited to 'internal/db/two_factor.go')
-rw-r--r-- | internal/db/two_factor.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/db/two_factor.go b/internal/db/two_factor.go index 1c310535..177f38f3 100644 --- a/internal/db/two_factor.go +++ b/internal/db/two_factor.go @@ -18,8 +18,8 @@ import ( // TwoFactor is a 2FA token of a user. type TwoFactor struct { - ID int64 - UserID int64 `xorm:"UNIQUE" gorm:"UNIQUE"` + ID int64 `gorm:"primaryKey"` + UserID int64 `xorm:"UNIQUE" gorm:"unique"` Secret string Created time.Time `xorm:"-" gorm:"-" json:"-"` CreatedUnix int64 |