修复username唯一索引导致初始化数据库失败的问题
This commit is contained in:
parent
4ced4691dd
commit
30d512cfe7
@ -13,7 +13,7 @@ const (
|
|||||||
|
|
||||||
type User struct {
|
type User struct {
|
||||||
ID string `gorm:"primary_key" json:"id"`
|
ID string `gorm:"primary_key" json:"id"`
|
||||||
Username string `gorm:"index:unique" json:"username"`
|
Username string `gorm:"uniqueIndex" json:"username"`
|
||||||
Password string `json:"password"`
|
Password string `json:"password"`
|
||||||
Nickname string `json:"nickname"`
|
Nickname string `json:"nickname"`
|
||||||
TOTPSecret string `json:"-"`
|
TOTPSecret string `json:"-"`
|
||||||
|
Loading…
Reference in New Issue
Block a user