Save user tokens as varchar(450) and not text to fix mysql indexing issues
This commit is contained in:
parent
7e229a1b83
commit
2a80e552cc
2 changed files with 2 additions and 2 deletions
|
@ -36,7 +36,7 @@ func (u user20210711173657) TableName() string {
|
||||||
type userTokens20210711173657 struct {
|
type userTokens20210711173657 struct {
|
||||||
ID int64 `xorm:"bigint autoincr not null unique pk"`
|
ID int64 `xorm:"bigint autoincr not null unique pk"`
|
||||||
UserID int64 `xorm:"not null"`
|
UserID int64 `xorm:"not null"`
|
||||||
Token string `xorm:"TEXT not null index"`
|
Token string `xorm:"varchar(450) not null index"`
|
||||||
Kind int `xorm:"not null"`
|
Kind int `xorm:"not null"`
|
||||||
Created time.Time `xorm:"created not null"`
|
Created time.Time `xorm:"created not null"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ const (
|
||||||
type Token struct {
|
type Token struct {
|
||||||
ID int64 `xorm:"bigint autoincr not null unique pk"`
|
ID int64 `xorm:"bigint autoincr not null unique pk"`
|
||||||
UserID int64 `xorm:"not null"`
|
UserID int64 `xorm:"not null"`
|
||||||
Token string `xorm:"TEXT not null index"`
|
Token string `xorm:"varchar(450) not null index"`
|
||||||
Kind TokenKind `xorm:"not null"`
|
Kind TokenKind `xorm:"not null"`
|
||||||
Created time.Time `xorm:"created not null"`
|
Created time.Time `xorm:"created not null"`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue