File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed
Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ type Application struct {
1717 // read only: true
1818 // required: true
1919 // example: AWH0wZ5r0Mbac.r
20- Token string `gorm:"unique_index" json:"token"`
20+ Token string `gorm:"type:varchar(180); unique_index" json:"token"`
2121 UserID uint `gorm:"index" json:"-"`
2222 // The application name. This is how the application should be displayed to the user.
2323 //
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ type Client struct {
1717 // read only: true
1818 // required: true
1919 // example: CWH0wZ5r0Mbac.r
20- Token string `gorm:"unique_index" json:"token"`
20+ Token string `gorm:"type:varchar(180); unique_index" json:"token"`
2121 UserID uint `gorm:"index" json:"-"`
2222 // The client name. This is how the client should be displayed to the user.
2323 //
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ type PluginConf struct {
55 ID uint `gorm:"primary_key;AUTO_INCREMENT;index"`
66 UserID uint
77 ModulePath string `gorm:"type:text"`
8- Token string `gorm:"unique_index"`
8+ Token string `gorm:"type:varchar(180); unique_index"`
99 ApplicationID uint
1010 Enabled bool
1111 Config []byte
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package model
33// The User holds information about the credentials of a user and its application and client tokens.
44type User struct {
55 ID uint `gorm:"primary_key;unique_index;AUTO_INCREMENT"`
6- Name string `gorm:"unique_index"`
6+ Name string `gorm:"type:varchar(180); unique_index"`
77 Pass []byte
88 Admin bool
99 Applications []Application
You can’t perform that action at this time.
0 commit comments